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.

Ajc1922TestsJava.java 1.7KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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.apache.bcel.Constants;
  11. import org.aspectj.systemtest.ajc10x.Ajc10xTests;
  12. import org.aspectj.testing.JavaVersionSpecificXMLBasedAjcTestCase;
  13. import org.aspectj.testing.XMLBasedAjcTestCase;
  14. /**
  15. * @author Alexander Kriegisch
  16. */
  17. public class Ajc1922TestsJava extends JavaVersionSpecificXMLBasedAjcTestCase {
  18. private static final Constants.ClassFileVersion classFileVersion = Constants.ClassFileVersion.of(22);
  19. public Ajc1922TestsJava() {
  20. super(22);
  21. }
  22. public void testUnnamedPatterns() {
  23. runTest("unnamed patterns");
  24. }
  25. public void testUnnamedPatternsAspect() {
  26. runTest("unnamed patterns aspect");
  27. }
  28. /**
  29. * Same as {@link Ajc10xTests#test052()}, but compiled to target 22 instead of 1.4
  30. */
  31. public void testUnderscoreInPointcutPattern1() {
  32. runTest("underscore can still be used in pointcut patterns on Java 21+ - 1");
  33. }
  34. public void testUnderscoreInPointcutPattern2() {
  35. runTest("underscore can still be used in pointcut patterns on Java 21+ - 2");
  36. }
  37. public static Test suite() {
  38. return XMLBasedAjcTestCase.loadSuite(Ajc1922TestsJava.class);
  39. }
  40. @Override
  41. protected java.net.URL getSpecFile() {
  42. return getClassResource("ajc1922.xml");
  43. }
  44. }