aboutsummaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
...
* Reactivate some tests on JDK 21 after upstream fixAlexander Kriegisch2023-11-273-28/+1
| | | | | | | https://github.com/eclipse-jdt/eclipse.jdt.core/issues/1466 has finally been fixed. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* AllTests19 suite: add AllTestsAspectJ1921Alexander Kriegisch2023-11-271-0/+2
| | | | | | | Until now, the CI build did not run Java 21 tests, but they look OK locally. Now, let's find out what GitHub Actions says. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Add missing file RecordPatternsPreview1ExhaustivenessOK1.java for JDK 21Alexander Kriegisch2023-11-271-0/+34
| | | | | | | | This file was missing, which did not trigger an error in CI builds, because AllTestsAspectJ1921 was not part of the AllTests19 suite before. The latter will be fixed in the next commit. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Set version 1.9.21-SNAPSHOTAlexander Kriegisch2023-11-191-1/+1
| | | | Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Release milestone 1.9.21.M1V1_9_21_M1Alexander Kriegisch2023-11-191-1/+1
| | | | Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Enable some tests after J19 problems were fixed for J21Alexander Kriegisch2023-11-055-20/+52
| | | | | | | | | | Two test classes which had redundant default clauses for switch with record patterns were copied from the java19 to the java21 directory and the redundant clauses deactivated, i.e. the test now run as originally intended. For older JDK versions, the old tests still stay active in order to document the old state of affairs. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Make all existing tests run on JDK 21Alexander Kriegisch2023-10-056-488/+393
| | | | | | | | | | | This mostly affects pattern matching for switch and record patterns. Two tests which were working before for pattern matching for switch (preview 4), started to fail, so the corresponding code was commented out and https://github.com/eclipse-jdt/eclipse.jdt.core/issues/1466 recorded. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Move some 1.9.20.1 bug tests to correct directoryAlexander Kriegisch2023-10-055-5/+9
| | | | Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Add test infrastructure for Java 21 (WIP)Alexander Kriegisch2023-10-0510-3/+908
| | | | | | | The tests and their XML definitions are still copy & paste and need to be cleaned up. Separate Java 21 feature tests do not exist yet. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Beautify sanity tests using bytecode level constantsAlexander Kriegisch2023-10-0512-29/+45
| | | | Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Remove old '.cvsignore' filesAlexander Kriegisch2023-09-277-10/+0
| | | | Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Set version to 1.9.21-SNAPSHOTAlexander Kriegisch2023-09-041-1/+1
| | | | Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* AspectJ release 1.9.20.1Alexander Kriegisch2023-09-041-1/+1
| | | | Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* ajc162.xml: Fix test failing after previous bugfixAlexander Kriegisch2023-08-231-2/+2
| | | | | | | | | | | | | A change made to ajc162.xml in commit 43cb1e2f has been reverted and improved after the recent negated type pattern fix. Relates to #257. The pointcut 'call(!void *.*(..)) && this(src) && target(dst)' actually does match method call 'payloadClass.getPayload()' within the around-advice in GenericClassInAdvice itself. Improvement: Activate '-showWeaveInfo' and verify weaving message. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Add regression test for #257Alexander Kriegisch2023-08-233-0/+174
| | | | | | Relates to #257. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Improve bridge method test, bootstrapping ASM usageAlexander Kriegisch2023-08-223-3/+11
| | | | | | | | | | | Instead of using a pre-generated JAR, the source code generating the class with reordered methods (bridge method first) is now compiled directly before usage. This is possible, because in the previous commit ASM was put on the Ajc classpath for tests. Relates to #256. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Regression test for Spring issue 27761Alexander Kriegisch2023-08-215-0/+117
| | | | | | | | | | Relates to spring-projects/spring-framework#27761. The test needs an ASM-generated class file with reordered methods in order to reproduce the issue in plain AspectJ. The test fails now, but should pass after the fix. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Set version to 1.9.21-SNAPSHOTAlexander Kriegisch2023-08-161-1/+1
| | | | Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Release 1.9.20V1_9_20Alexander Kriegisch2023-08-161-1/+1
| | | | Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Move 1.9.20 bug regression tests to the correct spotsAlexander Kriegisch2023-08-1515-247/+247
| | | | | | | | | | | Originally, I had intended to release a minor 1.9.19.1 release to fix some bugs. But then, Java 20 support was implemented and merged, so the next release will be 1.9.20. Therefore, I moved some bug regression tests to the 1.9.20 suite. Relates to #254. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Fix tests using Javac via Ant using source/target < 1.8Alexander Kriegisch2023-08-061-1/+1
| | | | | | Since JDK 20, targets older than 1.8 are no longer supported by Javac. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Fix inline accessor method bug in BcelAccessForInlineMungerAlexander Kriegisch2023-08-061-3/+5
| | | | | | | | | | Make sure to create one ajc$inlineAccessMethod per identically named (overloaded) private aspect method in BcelAccessForInlineMunger.createOrGetInlineAccessorForMethod. Fixes #250. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Add regression test for #250Alexander Kriegisch2023-08-063-0/+62
| | | | | | Reproduces #250. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Add method ArrayReferenceType.equals to fix failing testsAlexander Kriegisch2023-06-262-1/+13
| | | | | | | | | | | This also fixes a bug. Previously, ResolvedType.equals was used for equality check, and in there is a '==' comparison, which does not work for two different ArrayReferenceType instances, even if the component type is the same. Relates to #246. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Add failing test reproducing #246Alexander Kriegisch2023-06-266-2/+55
| | | | Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Adjust expected error message in switch pattern tests after upstream typo fixAlexander Kriegisch2023-06-244-11/+11
| | | | | | | See: https://github.com/eclipse-jdt/eclipse.jdt.core/issues/919 https://github.com/eclipse-jdt/eclipse.jdt.core/commit/b681dfb5 Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Improve SystemPropertiesTestAlexander Kriegisch2023-06-241-5/+3
| | | | | | | | | | - Fix quotation error in console output - Throw RuntimeException instead of Error. Maybe this helps to avoid the prominent error message listing in the GitHub build log, which always looks like something bad happened, even though it is simply an expected error. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Add AllTestsAspectJ1920 to AllTests19 suiteAlexander Kriegisch2023-06-241-0/+2
| | | | Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* eclipse-jdt/eclipse.jdt.core#919 has been fixedAlexander Kriegisch2023-06-241-5/+0
| | | | Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Fix tests using Javac using source/target 1.7Alexander Kriegisch2023-06-241-4/+4
| | | | | | Javac 20+ no longer supports 1.7. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Add basic tests for Java 20, deactivate Java 19 preview testsAlexander Kriegisch2023-06-2413-10/+730
| | | | Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Fix XML config for Bugs1919Tests.test_GitHub_214Alexander Kriegisch2023-06-041-2/+4
| | | | | | | | | | | | | | | | | | | | | | The test started breaking on GitHub, but ran fine locally, which implied some kind of classpath ordering issue. As it turned out, for XML tests all JARs found in the sandbox directory are added to the classpath automatically. So if we do not want them on the classpath, we need to delete or rename them before running. In this case, however, it was enough to make sure the classpath order is correct, so that the duplicate 'Application' class is found in the woven version, not in the unwoven one by chance. We therefore need to use the correct syntax, 1. separating classpath entries by comma, not space, 2. prepending '$sandbox/' to the JAR name. Now the test reliably does what it should have done from the start: run the woven code. Until now, the output assertions were adjusted to the weird result of no aspect logs being present on the console, which was wrong right from the start. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Sync HandleProviderDelimiter with JDT Core & AJDTAlexander Kriegisch2023-02-2629-273/+276
| | | | | | | | | | | | | | | | | | | | | | New constants: JEM_MODULAR_CLASSFILE - '\'' (single quote) ANNOTATION - '}' LAMBDA_EXPRESSION - ')' LAMBDA_METHOD - '&' STRING - '"' MODULE - '`' DELIMITER_ESCAPE - '=' Updated AspectJ constants due to JDT Core using constants previously used by AspectJ: ADVICE - '&' to '§' ASPECT_TYPE - '\'' to '>' ITD_METHOD - ')' to '°' DECLARE - '`' to '´' POINTCUT - '"' to '©' Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Add regression test reproducing GitHub #214Alexander Kriegisch2023-01-217-0/+68
| | | | Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Comment on newly pointcut parsing found problem in test classAlexander Kriegisch2023-01-152-0/+27
| | | | | | | | | | | | A pointcut like execution(*..Collection<?>[] *(..)) leads to an AJ core dump, which is something I noticed while fixing a test in the previous commit. I am going to create a new issue for it and link to this commit later. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Fix failing tests after previous commitAlexander Kriegisch2023-01-154-23/+35
| | | | | | | | | After the changes, the weaver's behaviour is now slightly different, but not actually buggy. Actually, in one case there is now a weaver warning for a non-matching pointcut which should have been there before, but was not. I.e., things have improved and the tests are even a bit better now. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Remove old, erroneously committed binaries from tests/bugs193/543657Alexander Kriegisch2023-01-159-0/+0
| | | | Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* WildTypePattern: fix hashCode and toString methodsAlexander Kriegisch2023-01-151-6/+20
| | | | | | | | | | | | | | | | | | | | | | | | Especially 'hashCode' did not correspond to 'equals', disregarding several fields, array dimension information being only one of them. This led to parts of pointcuts being ignored, because they were regarded as duplicates. Example: execution(Foo* *(..)) && !execution(Foo*[] *(..)) Here, the negated pattern was falsely regarded as equal to the first pattern, leading to an "A && !A" situation, i.e. no match at all. Furthermore, 'toString' did not print array strings, i.e. instead of "Foo*[][]" something like "Foo*" was printed. This false information was also present in annotations generated by the weaver. FuzzilyMatchingAspect was adjusted to actually match exactly once, as expected, for the "Foo*" return types, i.e. exclusions for the array return types have been added. Relates to #24. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Expand regression tests for GitHub bug #24Alexander Kriegisch2023-01-154-13/+112
| | | | | | | | | | More test cases were added for - multi-dimensional arrays, - primitive type arrays. Relates to https://github.com/eclipse/org.aspectj/issues/24. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Add regression tests for GitHub bug #24Alexander Kriegisch2023-01-155-0/+142
| | | | | | Relates to https://github.com/eclipse/org.aspectj/issues/24. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Refactor, comment and reactivate Ajc183Tests.testAnnoStyleDecp_442425Alexander Kriegisch2023-01-077-67/+74
| | | | | | | | | | This test was always inactive and did not add any value other than during development. No it runs, passes and documents the status quo of - what was fixed (regression for AJC 1.8.2 core dump fixed in 1.8.3), - the current limitations of @DeclareParents and @DeclareMixin regarding generic interfaces. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Remove some old, accidentally committed class files from testsAlexander Kriegisch2023-01-079-0/+0
| | | | Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* BcelTypeMunger.mungeMethodDelegate: only use 'synchronized' when necessaryAlexander Kriegisch2023-01-071-3/+5
| | | | | | | | | | | | | | | | | | | | | Relates to #198. Now, we create a delegate method body which basically looks as follows: public void methodOne() { if (this.ajc$instance$MyAspect$MyMixin == null) { synchronized(this) { if (this.ajc$instance$MyAspect$MyMixin == null) { this.ajc$instance$MyAspect$MyMixin = MyAspect.aspectOf().createImplementation(this); } } } this.ajc$instance$MyAspect$MyMixin.methodOne(); } The idea for the outer null check is from @aclement, see https://github.com/eclipse/org.aspectj/pull/205#issuecomment-1371556080. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* No more compiler errors for implicitly static inner aspects of interfacesAlexander Kriegisch2023-01-063-0/+54
| | | | | | | Fixes #162. Contains regression test Bugs1919Tests.testInterfaceInnerAspectImplicitlyStatic. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Test cosmeticsAlexander Kriegisch2023-01-062-3/+3
| | | | Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Add test reproducing problem from #198Alexander Kriegisch2023-01-043-25/+133
| | | | Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Fix parenthesised AJ keyword compiler problemAlexander Kriegisch2023-01-043-0/+57
| | | | | | Fixes #20. Needs JDT Core grammar fix. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Regression test for #190Alexander Kriegisch2022-12-303-0/+36
| | | | Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Fix indentation in ajc1919.xml (cosmetics)Alexander Kriegisch2022-12-301-8/+8
| | | | Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Set version to 1.9.20-SNAPSHOTAlexander Kriegisch2022-12-211-1/+1
|