You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

AllTestsAspectJ1921.java 2.2KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /*******************************************************************************
  2. * Copyright (c) 2022 Contributors
  3. * All rights reserved. This program and the accompanying materials
  4. * are made available under the terms of the Eclipse Public License v 2.0
  5. * which accompanies this distribution, and is available at
  6. * https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt
  7. *******************************************************************************/
  8. package org.aspectj.systemtest.ajc1921;
  9. import junit.framework.Test;
  10. import junit.framework.TestSuite;
  11. import org.aspectj.tools.ant.taskdefs.AjcTask;
  12. import org.aspectj.util.LangUtil;
  13. // AspectJ_JDK_Update
  14. // - Copy 'ajc*' package with all classes to a new package, incrementing the version number in the package
  15. // - Rename all classes, incrementing version numbers
  16. // - Add this class to the suite in class AllTests19
  17. // - Increment version numbers in strings, method calls and constants to the appropriate values, creating necessary
  18. // methods and constants classes providing them, if they do not exist yet
  19. // - Also increment references to 'ajc*.xml' and 'sanity-tests-*.xml' test definition, copying the previous
  20. // tests/src/test/resources/org/aspectj/systemtest/ajc* directory, incrementing all names and adjusting the XML
  21. // file contents appropriately
  22. // - Search for other 'AspectJ_JDK_Update' hints in the repository, also performing the necessary to-dos there
  23. // - Remove this comment from the previous class version after copying this one
  24. /**
  25. * @author Alexander Kriegisch
  26. */
  27. public class AllTestsAspectJ1921 {
  28. private static final int JAVA_VERSION = 21;
  29. public static Test suite() {
  30. TestSuite suite = new TestSuite("AspectJ 1.9.21 tests");
  31. suite.addTest(Bugs1921Tests.suite());
  32. if (LangUtil.isVMGreaterOrEqual(JAVA_VERSION)) {
  33. suite.addTest(SanityTestsJava21.suite());
  34. suite.addTest(Ajc1921TestsJava.suite());
  35. }
  36. // Do not run tests using a previous compiler's preview features anymore. They would all fail.
  37. if (AjcTask.JAVA_VERSION_MAX == JAVA_VERSION) {
  38. if (LangUtil.isVMGreaterOrEqual(JAVA_VERSION) && LangUtil.isVMLessOrEqual(JAVA_VERSION)) {
  39. suite.addTest(Java21PreviewFeaturesTests.suite());
  40. }
  41. }
  42. return suite;
  43. }
  44. }