You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The test was asserting that aspects with lower priority would be executed before aspects with higher priority; but this disregarded their application time. If an aspect with lower priority is added before the execution of an aspect happens, there is no way it can execute before it.
This fixes error assertions that look like this:
```
TREE
+- (root) <-- AddAspect_2822([First,], Mutate_2743@0)@0, Mutate_2743@0 (added), Mutate_2751@0 (added)
+- First <-- AddAspect_2822([First,], Mutate_2743@0)@0, AddAspect_2809([], Mutate_2751@0)@0, Mutate_2743@0 (added)
+- (added) Tree
VISITS
0. <root> <-- AddAspect_2822([First,], Mutate_2743@0)
1. First <-- AddAspect_2822([First,], Mutate_2743@0)
2. First <-- AddAspect_2809([], Mutate_2751@0)
3. First <-- Mutate_2743
4. Tree <-- AddAspect_2822([First,], Mutate_2743@0)
Got error: Aspect Mutate_2743@0 at 3 should have been before AddAspect_2809([], Mutate_2751@0)@0 at 2, but was after
```
----
*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
thrownewError(`Aspect ${aspectApplication.aspect.constructor.name} applied on ${aspectApplication.construct.node.path} did not visit construct ${construct.node.path} in its original scope.`);
thrownewError(`Aspect ${aspectApplication.aspect.constructor.name} applied on ${aspectApplication.construct.node.path} did not visit construct ${construct.node.path} in its scope.`);
62
62
}
@@ -107,7 +107,11 @@ test('for every construct, lower priorities go before higher priorities', () =>
0 commit comments