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.

Java22PreviewFeaturesTests.java 1.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /*******************************************************************************
  2. * Copyright (c) 2024 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.ajc1922;
  9. import junit.framework.Test;
  10. import org.aspectj.systemtest.ajc10x.Ajc10xTests;
  11. import org.aspectj.testing.JavaVersionSpecificXMLBasedAjcTestCase;
  12. import org.aspectj.testing.XMLBasedAjcTestCase;
  13. /**
  14. * @author Alexander Kriegisch
  15. */
  16. public class Java22PreviewFeaturesTests extends JavaVersionSpecificXMLBasedAjcTestCase {
  17. public Java22PreviewFeaturesTests() {
  18. super(22, 22);
  19. }
  20. public void testStringPatterns() {
  21. runTest("string patterns");
  22. }
  23. public void testStringPatternsAspect() {
  24. runTest("string patterns aspect");
  25. }
  26. public void testNamedClassWithSimpleMainMethod() {
  27. runTest("named class with simple main method");
  28. }
  29. public void testNamedAspectWithSimpleMainMethod() {
  30. runTest("named aspect with simple main method");
  31. }
  32. /**
  33. * Still not implemented with the Java 21 release Eclipse 2023-12 (4.30),
  34. * see <a href="https://github.com/eclipse-jdt/eclipse.jdt.core/issues/1106">GitHub issue 1106</a>.
  35. */
  36. public void testUnnamedClassWithSimpleMainMethod() {
  37. runTest("unnamed class with simple main method");
  38. }
  39. public static Test suite() {
  40. return XMLBasedAjcTestCase.loadSuite(Java22PreviewFeaturesTests.class);
  41. }
  42. @Override
  43. protected java.net.URL getSpecFile() {
  44. return getClassResource("ajc1922.xml");
  45. }
  46. }