aboutsummaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
...
| * Add test "asynchronous proceed for nested around-advice chain"Alexander Kriegisch2022-03-237-0/+168
| | | | | | | | | | | | Relates to #128. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* | Fix more LTW testsAlexander Kriegisch2022-03-232-3/+30
| | | | | | | | Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* | A few dozen more tests need 'useFullLTW' modeAlexander Kriegisch2022-03-2314-147/+147
| | | | | | | | Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* | AtAjLTWTests: 4 test cases switched to 'useFullLTW' modeAlexander Kriegisch2022-03-232-13/+14
| | | | | | | | | | | | | | | | After the Java 18 JDT Core upgrade, some LTW tests are failing and have to be switched from in-process to full LTW mode due to them now obviously calling some code paths which need '--add-opens'. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* | Prepare code, tests and docs for Java 18Alexander Kriegisch2022-03-2120-125/+647
|/ | | | | | | | | | | | | | | | | | | | - JDT Core dependency in pom.xml - Constants.java - LangUtil.java - AjcTask.java - messages_aspectj.properties - XMLBasedAjcTestCaseForJava17Only.java - XMLBasedAjcTestCaseForJava18*.java - tests/bugs199 - tests/features199 - JavaVersionCompatibility.md - README-199.html - GitHub CI build Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Regression test for #125: Bugs198Tests.testGitHub_125Alexander Kriegisch2022-02-234-3/+48
| | | | | | | | | | | | | | | | | | | | | | | | This test fails when run against AspectJ 1.9.8 with JDT Core 1.9.8.RC3. It passes when using the latest JDT Core 1.9.9-SNAPSHOT. It sets system property 'org.aspectj.weaver.openarchives=20', provoking open classpath JAR file exhaustion when compiling a simple class with AJC, i.e. JARs are being forcibly closed and automatically re-opened, as soon as they are needed. Before the JDT Core bugfix, this test causes: java.lang.NullPointerException at ....compiler.batch.ClasspathJmod.getModulesDeclaringPackage With the bugfix incorporated into AspectJ Tools, the problem is gone. Note: New test dependency 'io.github.bmuskalla:scoped-system-properties' helps to test compilation with the temporarily changed global system property in isolation, saving the environment in a thread-local variable and later cleanly restoring the original values again. If we ever switch to parallel test execution, this would otherwise influence other tests and potentially cause weird side effects. Better safe than sorry. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Move some tests from Ajc198TestsJava to Bugs198TestsAlexander Kriegisch2022-02-232-20/+20
| | | | | | | | | They were accidentally stored in thw wrong test class, not just because they are bug regression tests, not 1.9.8 features, but also because they are meant to work on Java 5+, not on Java 17+ like the ones in Ajc198TestsJava. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Set version to 1.9.9-SNAPSHOTAlexander Kriegisch2022-02-111-1/+1
|
* Set version to 1.9.8V1_9_8Alexander Kriegisch2022-02-111-1/+1
|
* Improve annotation style if pointcut handlingAndy Clement2022-01-315-15/+188
| | | | | | | | | This fixes: - negating annotation style if() pointcuts doesn't work - annotation style if() pointcut not able to use a binding that is not exposed Fixes #120,#122
* Fix annotation style support for if(true) and if(false)Andy Clement2022-01-174-0/+95
| | | | | | | | | | The documentation specifies annotation style pointcuts can use if(false) or if(true) and not require a boolean return value and body for the @Pointcut annotated method but it doesn't work without this change to validation that recognizes the situation. Fixes #115
* Add test for Java 11 constant-dynamicAlexander Kriegisch2022-01-087-0/+140
| | | | | | Relates to #68. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Merge pull request #102 from turbanoff/trim_trailing_whitespacesAndy Clement2021-11-304-7/+7
|\ | | | | Trim trailing whitespaces.
| * Trim trailing whitespaces.Andrey Turbanov2021-11-204-7/+7
| | | | | | | | | | Trailing whitespaces are useless. Most of code-styles forbids them. Most of editors always trim them on save. I propose to clean up project from trailing whitespaces in all java files at once.
* | Merge pull request #101 from turbanoff/use_StringBuilder_instead_of_StringBufferAndy Clement2021-11-306-15/+15
|\ \ | | | | | | Replace uses of StringBuffer with StringBuilder.
| * | Replace uses of StringBuffer with StringBuilder.Andrey Turbanov2021-11-206-15/+15
| |/ | | | | | | StringBuffer is a legacy synchronized class. StringBuilder is a direct replacement to StringBuffer which generally have better performance.
* | Add forgotten Bugs198Tests to test suiteAlexander Kriegisch2021-11-262-0/+6
| | | | | | | | Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* | Set version to 1.9.8-SNAPSHOTAlexander Kriegisch2021-11-261-1/+1
| | | | | | | | Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* | Set version to 1.9.8.RC3V1_9_8_RC3Alexander Kriegisch2021-11-261-1/+1
| | | | | | | | Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* | Incorporate JDT Core fix + test for #105Alexander Kriegisch2021-11-266-0/+73
|/ | | | Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Set version to 1.9.8-SNAPSHOTAlexander Kriegisch2021-10-081-1/+1
|
* Release version to 1.9.8.RC1V1_9_8_RC1Alexander Kriegisch2021-10-081-1/+1
| | | | Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Fix Java17PreviewFeaturesTests (locale-specific floating-point output)Alexander Kriegisch2021-10-083-4/+6
| | | | | | | The test worked on my local workstation with German locale, but not on GitHub with English locale. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Update ECJ version, activate Java 17 preview features testsAlexander Kriegisch2021-10-023-22/+18
| | | | | | | After JDT Core (ECJ) was updated to the final Java 17 feature set, the tests now pass as expected. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Add + activate some Java 17 testsAlexander Kriegisch2021-09-077-62/+239
| | | | | | | | | | | | | - Fix one fault sanity test configuration - Deactivate Java 16 preview tests (no longer supported by Java 17 compiler) - Test sealed classes as final on Java 17 (no longer preview) - Add tests for JEP 406, pattern matching for switch (preview). At present, the beta 17 branch of JDT Core does not handle the tested features and expected compile errors correctly yet, so I had to temporarily deactivate test execution, only printing TODO messages. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Test comment cosmeticsAlexander Kriegisch2021-09-079-9/+12
| | | | Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Refactor AnnoBinding test class used by Ajc1612Tests some moreAlexander Kriegisch2021-08-081-20/+22
| | | | | | | Improve improved general logging, error messages, variable naming and indentation, making the code of class AnnoBinding a bit more readable. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Improve flaky test in Ajc1612Tests furtherAlexander Kriegisch2021-08-081-5/+5
| | | | | | | | | | | | | | | By using System.nanoTime() instead of currentTimeMillis(), the flakiness even with the original 10,000 rounds is significantly lower than before. Making my IDE repeat the test until failure, it took on average 150 runs to make it fail. So, the more accurate timing helps. With 100,000 rounds, it was even more stable, but eventually I could make it fail. With 1,000,000 rounds however, even running the test 500x could not make it fail. So for all practical purposes, I think the test is reasonably stable now. Closes #83. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Stabilise flaky test in Ajc1612TestsAlexander Kriegisch2021-08-051-2/+4
| | | | | | | | | | | By increasing from 10,000 to 1,000,000 rounds, the times compared for performance become considerably longer (but still in the tens or hundreds or milliseconds), decreasing the probability of the test failing due to CPU load or some other random effect. Closes #83. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Add integration test for '--release N' compiler optionAlexander Kriegisch2021-06-264-0/+101
| | | | | | Relates to #70 Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Add AspectJ 1.9.7 and Java 17 test skeletonsAlexander Kriegisch2021-06-267-0/+335
| | | | Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Set version to 1.9.8-SNAPSHOTAndy Clement2021-06-241-1/+1
|
* 1.9.7 releaseV1_9_7Andy Clement2021-06-241-1/+1
|
* Upgrade license from CPLv1/EPLv1 to EPLv2Alexander Kriegisch2021-06-04309-2175/+2184
| | | | | | | This was required by the Eclipse team as one precondition for the next release. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Use canonical snapshot version 1.9.7-SNAPSHOTAlexander Kriegisch2021-05-231-1/+1
| | | | | | | | | Before, we used 1.9.7.BUILD-SNAPSHOT, which according to Andy Clement was originally an intent across a group of Spring projects he was involved in, to ensure that SNAPSHOTS were sorted alphabetically ahead of MILESTONEs and ahead of RCs. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Replace use of ASM-renamed by original ASMAlexander Kriegisch2021-05-162-6/+6
| | | | | | | | | | | | This involves replacing references in weaver application code as well as a few tests. In order to make AspectJ weaver + tools contain a relocated ASM version, I added a Maven Shade relocation step after Maven Assembly created the uber JARs. Relocation works for both binaries and sources and also encompasses Class::forName calls like in class AsmDetector. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Provision libraries in 'lib' automaticallyAlexander Kriegisch2021-05-051-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Upon special request by Andy Clement, I included 'lib' as a child module in the parent POM again, making several modules which refer to downloaded library files dependent the 'lib' module. I am not sure I caught all of them, but I hope so. Now after cloning the project and configuring the token for reading from GitHub Packages (sorry!), you can just run a Maven build for the main project and no longer need to fail the first build, read the Maven Enforcer message and run 'cd lib && mvn compile' as a first step. This convenience comes at the price of a more complex POM and two new profiles: - Profile 'provision-libs' is auto-activated by the absence of a marker file, kicking off the library provisioning process and creating same marker file at the end, if successful. Therefore, during subsequent builds libraries will not be re-provisioned, because the marker file exists and Maven skips all download and (un)zip steps, which saves build time and bandwidth. Otherwise offline builds would not work either. - Profile 'clean-libs' needs to be activated manually, because by default 'mvn clean' will not erase provisioned libraries. In most cases, even after a clean a developer does not want to re-provision all libraries if they have not changed (e.g. new JDT Core build). But if you do wish too erase the libraries and the marker file, just call 'cd lib && mvn -P clean-libs clean'. Please note: The Maven Enforcer build step, which additionally checks for existence of other files, still exists and was moved from the parent POM to 'libs'. No matter if provisioning was just done or skipped because the main marker file exists, a quick heuristic check for that list of files is done during each build, failing the build with a comprehensive message if an inconsistency was found. The error message says which files are missing and tells the user: "There is an inconsistency in module subdirectory 'lib'. Please run 'mvn --projects lib -P clean-libs clean compile'. This should take care of cleaning and freshly downloading all necessary libraries to that directory, where some tests expect them to be." This should cover the topic. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Fix missing dependencies in module 'run-all-junit-tests'Alexander Kriegisch2021-04-281-2/+8
| | | | | | | | | | Some runtime dependencies are reported as unused in Maven Dependency Plugin goal 'dependency:analyze', but actually they are needed. I noticed by chance when running RunTheseBeforeYouCommitTests in IntelliJ IDEA for the first time after a while and dependency modules could not find classes. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Remove redundant 'name' and 'packaging' tags from POMsAlexander Kriegisch2021-04-152-3/+0
| | | | | | | If 'name' is identical to 'artifactId' and 'packaging' has the default value 'jar', we can just remove those tags from the POM. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Fix undetected runtime dependency usage problem from previous commitAlexander Kriegisch2021-04-121-0/+17
| | | | | | | | | In module 'tests', our tests need Ant launcher. Hence, dependency ant:ant-launcher was re-added to the POM (with test scope this time) and Maven Dependency plugin configured to regard it as a used dependency and not falsely report it as unused. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Clean up Maven dependencies using 'dependency:analyze' goalAlexander Kriegisch2021-04-121-32/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | Notably, this change involves a partial revert of @4a5660b3, because we are not using JUnit Jupiter yet but still JUnit 4 tests. See discussion under commit at https://github.com/eclipse/org.aspectj/commit/4a5660b3. Many other warnings - concerning both used undeclared and unused declared dependencies - were eliminated by adding or removing the corresponding dependencies from the POMs. Furthermore, I tried to make sure that some clearly test-scoped dependencies are now actually declared as such, so as to avoid unwanted transitivity bleeding into compile scope and maybe unwanted classes ending up in uber JARs via Maven Shade or Maven Assembly. TODO: I am not so sure why modules other than 'run-all-unit-tests' would depend on test JARs. I hope I broke nothing essential there. As of today, the other modules where I found '<type>test-jar</type>' dependencies are: - ajde - testing - testing-drivers - tests - weaver Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Switch from 'libx' to 'lib', delete all obsolete binariesAlexander Kriegisch2021-04-102-2/+2
| | | | | | | | | | | | | | | | | | | | Because 'cd lib && mvn compile' can now download and (un)zip many previously SCM-committed third-party dependencies, the following 'lib' subdirectories have been deleted: - ant - asm - commons - jarjar - junit - regexp - saxon This one is new (but not stored in SCM): - jdtcore-aj For each of them, there now is a .gitignore entry, so as to prevent developers from accidentally committing the downloaded binaries again. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Clean up remaining references to system-scoped dependenciesAlexander Kriegisch2021-04-101-17/+0
| | | | | | | | Now there is no system-scoped dependency left anymore in the Maven build, i.e. the corresponding warnings are gone and we can focus on the actual build log. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Remove JRockit LTW support, particularly JRockitAgentAlexander Kriegisch2021-04-101-56/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | In two places, the documentation now contains this text: "Since AspectJ 1.9.7, the obsolete Oracle/BEA JRockit agent is no longer part of AspectJ. JRockit JDK never supported Java versions higher than 1.6. Several JRockit JVM features are now part of HotSpot and tools like Mission Control available for OpenJDK and Oracle JDK." The decision to drop JRockit support was made during a discussion between Alexander Kriegisch and Andy Clement: Andy Clement wrote on 26 Mar 2021: > Yes I think so. > > > Alexander Kriegisch wrote on 26 Mar 2021: > >> https://en.wikipedia.org/wiki/JRockit >> >> Can we get rid of that? AspectJ requires Java 8, JRockit never >> supported more than Java 6. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* POM cosmetics, e.g. plugin version managementAlexander Kriegisch2021-04-091-0/+7
| | | | Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Improve 2 tests do delete temporary filesAlexander Kriegisch2021-04-091-8/+13
| | | | | | | | | There were some problems in file handling: One file in was not deleted in case an exception was thrown during the test. Another case was a JarFile which was not closed before deletion, which might work on Linux, but not on Windows where the open file is still locked after usage. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Module 'asm-renamed' now deploys to GitHub PackagesAlexander Kriegisch2021-04-091-5/+2
| | | | | | | | | | | This means that instead of a system-scoped dependency we now have a regular one. The 'libx' module also downloads binary and source JARs redundantly into the libraries directory in order to be found there by other scripts and tests. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Replace JDT Core system dependency by deployed oneAlexander Kriegisch2021-04-093-39/+36
| | | | | | | | | | Get rid of system paths. Instead, rely on JDT Core Shadows to deploy both binary and source JARs to GitHub Packages. The former module directory was deleted completely. Instead, the JARs are redundantly copied into 'libs/jdtcore-aj' in order to be found there by tests and other Ant scripts. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Remove ASM 2.0 dependency from AtAjLTWTests::testLTWUnweavableAlexander Kriegisch2021-03-292-28/+25
| | | | | | | | | | | | | | | | | | | | The test class UnweavableTest used ASM 2.0 API. I upgraded in two ways: 1. Now the ASM 9.1 API is used. Probably works with much older versions too (just not as old as 2.0), as long as the method and constructor signatures are the same). 2. The class now uses the AspectJ version of ASM (i.e. package names aj.org.objectweb.asm.*) and therefore can just use ASM as it is on the classpath for module 'tests' already. There is no more need to manually add '<pathelement path="${aj.root}/lib/asm/asm-2.0.jar"/>' to the Ant build script for that test. Consequently, asm-2.0.jar can be eliminated from Git SCM completely, because it was only used in this one test. BTW, I also removed some deprecated API and other types of warnings in UnweavableTest. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Replace system-scoped dependency on commons by granular dependenciesAlexander Kriegisch2021-03-291-0/+2
| | | | | | | | | | | | There are only two direct dependencies used in AspectJ code: - Commons Digester (module 'testing') - Commons Logging (module 'org.aspectj.matcher') I declared those two and experimentally removed all the other system-scoped dependencies, as it should be. Let's see if the build works with transitive dependencies. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>