aboutsummaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Revert "Remove module 'run-all-junit-tests' from root POM -> speed up the build"Alexander Kriegisch2021-03-231-1/+1
| | | | | | This reverts commit a1867b05ba6443d32abc4049c26b92fc226d6f78. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Fix some deprecated Java and JUnit warnings by using newer API callsAlexander Kriegisch2021-03-213-3/+3
| | | | Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Add Java 16 test suite for AspectJ 1.9.7 + test refactoringsAlexander Kriegisch2021-03-219-110/+275
| | | | | | | | | | | | | | | - Test all features which were preview in 14+15 and are now final in 16, compiling them with language level 16. - For Java 15 we only have sanity tests (and of course the Java <14 tests), compiling Java 16 features to target 15 does not seem to work. - Test remaining Java 16 preview feature (sealed classes). - Instead of overriding runTest(String) in several base classes like XMLBasedAjcTestCaseForJava*Only or XMLBasedAjcTestCaseForJava*OrLater, we now override setUp() from JUnit's TestCase base class. This will run before runTest(String) and make the tests fail much faster, if a user tries to run them on the wrong VM. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Remove module 'run-all-junit-tests' from root POM -> speed up the buildAlexander Kriegisch2021-03-211-1/+1
| | | | | | | | | | | | | This module must be a relic from a test runner module once existing during the Ant build era, but transferred and kept alive in the Maven build. Actually, it almost doubles build time by running virtually all tests in all modules again when doing 'mvn test' from the project root. For now I only removed the module from the root POM, leaving behind comments there, in the module POM and in the now @Deprecated class RunTheseBeforeYouCommitTests. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Fix MultiProjectIncrementalTests.testInvalidAspectpath_pr121395Alexander Kriegisch2021-03-201-1/+8
| | | | | | | | | | | It failed with "RuntimeException: I never heard about what kind of build it was!!" on my (@kriegaex) Windows machine, mostly because in case of a failing full build the corresponding status is never set. TODO: Ensure that 'MyStateListener.informedAboutKindOfBuild' is set for failed builds, too. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Fix tests expecting usage texts as failure outputsAlexander Kriegisch2021-03-202-207/+201
| | | | | | | | | This is a follow-up on commit @31b2d60b. Some tests were actually expecting usage texts as failure outputs. Because that was fixed, the tests no longer see those failures, hence they should no longer expect them. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Fix test relying on JVM warning being stripped from outputAlexander Kriegisch2021-03-201-10/+9
| | | | | | | | | | | | | | | | The line in which warnings like "Archived non-system classes are disabled because the java.system.class.loader property is specified" appears can start with e.g."OpenJDK 64-Bit Server VM" or "Java HotSpot(TM) 64-Bit Server VM". Therefore, an exact match on the former worked on Linux, but not on Windows, or maybe the difference is generally between Oracle and OpenJDK. anyway, I use Oracle on Windows and my build failed. Now it is fixed because I made the match more generic using a regex. I also removed a now obsolete check for the occurrence of the stripped line in test "JDK14 LTW with XML". Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Add Java 15 / AspectJ 1.9.7 test suiteAlexander Kriegisch2021-03-1717-17/+490
| | | | | | Also fix some minor details in Java 14 suite Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Add 'yield' usage to Java 12/13 switch expressions testsAlexander Kriegisch2021-03-173-19/+28
| | | | | | | So far this was a slight oversight, no test using 'yield' existed in the 'features193' test suite. Better late than never. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Do not run tests using Java 14 preview features on this Java 15 compilerAlexander Kriegisch2021-03-171-0/+3
| | | | | | | | | | | | | | | | These tests need a Java 14 level AspectJ compiler, because they use version-specific preview features. This compiler has been upgraded to a Java 15 compliant JDT Core already, i.e. it does not support preview features of a previous version anymore. An error message similar to the above explanation will appear when trying to run any XMLBasedAjcTestCaseForJava14Only subclass, such as Ajc196PreviewFeaturesTests (currently the only one). When running AllTestsAspectJ196, Ajc196PreviewFeaturesTests will not be added to the test suite anymore. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Restructure Java 14 / AJ 1.9.6 testsAlexander Kriegisch2021-03-178-9/+10
| | | | | | | | - Java 14 feature sample classes moved from 'bugs' to 'features' - One test case using a Java 14 preview feature was moved to the Java 14-only tests Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Upgrade to ASM 9.1, delete obsolete ASM binariesAlexander Kriegisch2021-03-161-1/+1
| | | | | | | | | | | Keep only ASM 2.0 binary because it is still used in UnweavableTest which uses an old ASM API, e.g. with a ClassWriter constructor which no longer exists. Also add JarJar 1.3 library because it is needed by an Ant task in lib/asm/build.xml. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Simplify execution of PureJavaTests and KnownLimitationsTestsAlexander Kriegisch2021-03-146-2242/+2229
| | | | | | | | | Getting rid of XML includes and two superfluous files, merging them with their respective including counterparts. As far as I can see, the two test suites are not part of the automatic build process, but can be started manually as easily as any other test (suite) now. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Fix outdated ajcTestSuite.dtd and lots of XML problemsAlexander Kriegisch2021-03-1414-314/+368
| | | | | | | | | Now there should be no more inspection warnings when working with XML test definitions. Only the strangely looking XML files used by PureJavaTests and KnownLimitationsTests are left to be analysed and fixed. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Make sure Java 14-only tests using preview are not executed on JVM 15+Alexander Kriegisch2021-03-144-57/+89
| | | | | | | | | | | Some Ajc196 tests are using preview features (see .../ajc196.xml), i.e. they will fail on Java 15+ because code compiled with '--enable-preview' can only run on the same JVM version, not on a more recent one. Hence, the preview-using tests are now being excluded in order to make the build run on Java 15, even though no Java 15 features are present in the current 1.9.7 snapshot. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Improve text matching in OutputSpec, fixing some failing Windows testsAlexander Kriegisch2021-03-142-2/+2
| | | | | | | | | | | | | | | | | | Some Java 14 text block tests failed on Windows because a StringTokenizer was used to split by LF, but the Windows line separator is CR+LF. Because a multi-line string ending with CR+LF is printed via 'System.out.println' in the test code, another CR+LF is added to the output, resulting in trailing CR+LF+CR+LF. Hence, between the two LFs, the tokenizer actually found an additional line consisting of CR (only on Windows, of course). Despite each line token actually containing a trailing CR token, that did not matter much because 'String.trim' was used everywhere before comparing values. Anyway, the improved OutputSpec uses text.trim().split("\\s*\n\\s*"), which takes care of leading/trailing whitespace both around the whole output and for each separate line. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Fix 'ajdoc' tests for Java 15 buildAlexander Kriegisch2021-03-144-150/+150
| | | | Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Add missing '-options' values -1.5, -1.9 to ajc{150,190_from150}.xmlAlexander Kriegisch2021-03-122-549/+427
| | | | | | | | | | | | | | | | | When trying to find out why ajc150.xml and ajc190_from150.xml look almost identical, I found out that only in many cases the 190 version has '-option="1.9"' set where in the 150 version it was '-option="1.9"'. Unfortunately, in both files source/target versions are not set at all in many places, which looks unintentional. I tried to search & replace all relevant '<compile ...>' commands for 190 first, then ported back to 150. Only cases in which clearly compiling to an older version like 1.3 or 1.4 is necessary were left like before. I am expecting missing or false Java target versions in many other of the legacy XML test suites. For now, I am just committing these two. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Replace path separators ';' by ',' in XML test specsAlexander Kriegisch2021-03-1114-1995/+1995
| | | | | | | | The goal is for them to be canonicalised to platform standard during test execution. I am not sure if that will fix any tests, but at least I hope it will not break any. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Fix MultiProjectIncrementalTests.testAspectPath_pr265693, 2nd tryAlexander Kriegisch2021-03-111-3/+7
| | | | | | | Do not assume a certain element order for tree nodes if there can be more than one. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Try to fix MultiProjectIncrementalTests.testAspectPath_pr265693Alexander Kriegisch2021-03-111-1/+1
| | | | | | | | Check if path vs. package name discrepancy makes test fail on Linux. On Windows it passes. So let's find out if file p/Asp.java vs. pkg.Asp causes the problems. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Fix path separators in ajc190.xml, make tests run on WindowsAlexander Kriegisch2021-03-111-21/+21
| | | | | | | Replace ':' by ";" which will be replaced to the platform separator automatically. A fixed value of ':' does not work on Windows. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
* Fix misplaced or incorrect javadoc tagsJerry James2020-09-142-2/+2
|
* Revert to 1.9.7.BUILD-SNAPSHOTAndy Clement2020-08-211-1/+1
|
* 1.9.7 milestone 1 publishedAndy Clement2020-08-211-1/+1
|
* Merge pull request #10 from larsgrefer/cleanup/pomAndy Clement2020-08-161-1/+0
|\ | | | | Cleanup the Maven pom.xml files
| * Remove project.parent.relative path as ../pom.xml is already the defaultLars Grefer2020-08-151-1/+0
| | | | | | | | Signed-off-by: Lars Grefer <eclipse@larsgrefer.de>
* | Reduce test output for incremental comp testsAndy Clement2020-08-155-50/+60
| |
* | Merge branch 'master' into feature/collection-performanceAndy Clement2020-08-157-67/+60
|\ \
| * | Reduce test output for incremental comp testsAndy Clement2020-08-155-49/+32
| | |
| * | Fix test on J14Andy Clement2020-08-152-18/+28
| |/
* | Weaken Collection declarationsLars Grefer2020-08-153-8/+9
| | | | | | | | | | | | Reports on declarations of Collection variables made by using the collection class as the type, rather than an appropriate interface. Signed-off-by: Lars Grefer <eclipse@larsgrefer.de>
* | Redundant Collection.addAll() callLars Grefer2020-08-151-2/+1
| | | | | | | | | | | | Reports Collection.addAll() and Map.putAll() calls after instantiation of a collection using a constructor call without arguments. Such constructs can be replaced with a single call to a parametrized constructor which simplifies code. Also for some collections the replacement might be more performant. Signed-off-by: Lars Grefer <eclipse@larsgrefer.de>
* | Collections.sort() can be replaced with List.sort()Lars Grefer2020-08-151-2/+2
|/ | | | | | Reports calls to Collections.sort(list, comparator) which could be replaced with list.sort(comparator). Signed-off-by: Lars Grefer <eclipse@larsgrefer.de>
* lets have maven fail if those tests fail...Andy Clement2020-08-1414-14/+1
|
* Merge branch 'master' of github.com:eclipse/org.aspectj into ↵Lars Grefer2020-08-145-17/+33
|\ | | | | | | remove-old-version-checks
| * Fix up tests and reduce verbosity on J11Andy Clement2020-08-143-15/+22
| |
| * Making tests behave on 11Andy Clement2020-08-133-4/+13
| |
* | Simplify checks for Java 8 to trueLars Grefer2020-08-141-5/+1
| | | | | | | | Signed-off-by: Lars Grefer <eclipse@larsgrefer.de>
* | Remove checks for old Java VersionsLars Grefer2020-08-135-42/+11
|/ | | | Signed-off-by: Lars Grefer <eclipse@larsgrefer.de>
* Use the diamond operator where possibleLars Grefer2020-08-139-42/+42
| | | | Signed-off-by: Lars Grefer <eclipse@larsgrefer.de>
* Unnecessary unboxingLars Grefer2020-08-081-1/+1
| | | | | | Reports "unboxing", e.g. explicit unwrapping of wrapped primitive values. Unboxing is unnecessary under Java 5 and newer, and can be safely removed. Signed-off-by: Lars Grefer <eclipse@larsgrefer.de>
* Unnecessary boxingLars Grefer2020-08-081-1/+1
| | | | | | Reports explicit boxing, i.e. wrapping of primitive values in objects. Explicit manual boxing is unnecessary under Java 5 and newer, and can be safely removed. Signed-off-by: Lars Grefer <eclipse@larsgrefer.de>
* 'String.indexOf()' expression is replaceable with 'contains()'Lars Grefer2020-08-0813-40/+39
| | | | | | Reports any String.indexOf() expressions which can be replaced with a call to the String.contains() method available in Java 5 and newer. Signed-off-by: Lars Grefer <eclipse@larsgrefer.de>
* 'for' loop replaceable with enhanced 'for' loopLars Grefer2020-08-0823-133/+95
| | | | | | Reports for loops which iterate over collections or arrays, and can be replaced with an enhanced for loop (i.e. the foreach iteration syntax). Signed-off-by: Lars Grefer <eclipse@larsgrefer.de>
* Rev to 1.9.7.BUILD-SNAPSHOTAndy Clement2020-07-221-1/+1
|
* AspectJ 1.9.6 final bitsV1_9_6Andy Clement2020-07-221-1/+1
|
* Update ASM and fix packaging for matcher artifactAndy Clement2020-07-171-1/+1
|
* polish and new test for 550705Andy Clement2020-05-016-11/+59
|
* 558995 testcodeAndy Clement2020-04-294-0/+221
|