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.

AllTestsAspectJ198.java 1.5KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /*******************************************************************************
  2. * Copyright (c) 2021 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.ajc198;
  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. /**
  14. * @author Alexander Kriegisch
  15. */
  16. public class AllTestsAspectJ198 {
  17. private static final int JAVA_VERSION = 17;
  18. public static Test suite() {
  19. TestSuite suite = new TestSuite("AspectJ 1.9.8 tests");
  20. suite.addTest(Bugs198Tests.suite());
  21. if (LangUtil.isVMGreaterOrEqual(9)) {
  22. suite.addTest(CompileWithReleaseTests.suite());
  23. }
  24. if (LangUtil.isVMGreaterOrEqual(11)) {
  25. suite.addTest(Bugs198Java11Tests.suite());
  26. }
  27. if (LangUtil.isVMGreaterOrEqual(JAVA_VERSION)) {
  28. suite.addTest(SanityTestsJava17.suite());
  29. suite.addTest(Ajc198TestsJava.suite());
  30. }
  31. // Do not run tests using a previous compiler's preview features anymore. They would all fail.
  32. if (AjcTask.JAVA_VERSION_MAX == JAVA_VERSION) {
  33. if (LangUtil.isVMGreaterOrEqual(JAVA_VERSION) && LangUtil.isVMLessOrEqual(JAVA_VERSION)) {
  34. suite.addTest(Java17PreviewFeaturesTests.suite());
  35. }
  36. }
  37. return suite;
  38. }
  39. }