diff options
author | Alexander Kriegisch <Alexander@Kriegisch.name> | 2023-01-15 01:25:11 +0100 |
---|---|---|
committer | Alexander Kriegisch <Alexander@Kriegisch.name> | 2023-01-15 14:41:51 +0100 |
commit | 91abb82c15a0ce80d37fd66e90c114147acbde04 (patch) | |
tree | c170848bb8ca428f2923393c00ef9b72e17eb490 /tests/bugs191 | |
parent | c9afd2ee1b1a701bffbe1d79f2a186b96c7e4f45 (diff) | |
download | aspectj-91abb82c15a0ce80d37fd66e90c114147acbde04.tar.gz aspectj-91abb82c15a0ce80d37fd66e90c114147acbde04.zip |
Fix PointcutRewriterTest, add LogicalPointcutStructure test helper class
After WildTypePattern.hashCode was fixed in the previous commit,
PointcutRewriterTest started failing, because in many places it was
falsely relying on a specific order of hash codes, which cannot be
guaranteed, especially since more instance fields are part of the hash
code now in accordance with 'equals'.
The new test helper class LogicalPointcutStructure is able to recognise
chained '&&' and '||' pointcuts of the same logical nesting level,
un-nesting them from the actual pointcut structure and making them
comparable, disregarding their order. I.e., something like
((A && B) && C) && D
is actually recognised to logically be
A && B && C && D
and equivalent to e.g. either of
D && B && A && C
A && B && D && C
C && A && D && B
This helps to compare rewritten pointcuts, as long as their logical
structure has not been altered.
Relates to #24.
Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
Diffstat (limited to 'tests/bugs191')
0 files changed, 0 insertions, 0 deletions