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.

Java19PreviewFeaturesTests.java 2.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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.ajc1919;
  9. import junit.framework.Test;
  10. import org.aspectj.apache.bcel.Constants;
  11. import org.aspectj.testing.XMLBasedAjcTestCase;
  12. import org.aspectj.testing.XMLBasedAjcTestCaseForJava19Only;
  13. /**
  14. * @author Alexander Kriegisch
  15. */
  16. public class Java19PreviewFeaturesTests extends XMLBasedAjcTestCaseForJava19Only {
  17. public void testSwitchPatternMatchingPreview3Java() {
  18. runTest("switch pattern matching preview 3 java");
  19. checkVersion("SwitchPatternPreview3OK", Constants.MAJOR_19, Constants.PREVIEW_MINOR_VERSION);
  20. }
  21. public void testSwitchPatternMatchingPreview3Aspect() {
  22. runTest("switch pattern matching preview 3 aspect");
  23. checkVersion("SwitchPatternPreview3Aspect", Constants.MAJOR_19, Constants.PREVIEW_MINOR_VERSION);
  24. checkVersion("Application", Constants.MAJOR_19, Constants.PREVIEW_MINOR_VERSION);
  25. checkVersion("Shape", Constants.MAJOR_19, Constants.PREVIEW_MINOR_VERSION);
  26. checkVersion("S", Constants.MAJOR_19, Constants.PREVIEW_MINOR_VERSION);
  27. }
  28. public void testSwitchPatternMatchingCaseLabelDominatedByPrecedingError() {
  29. runTest("switch pattern matching error");
  30. }
  31. public void testSwitchPatternMatchingPreview3Error1() {
  32. runTest("switch pattern matching preview 3 error 1");
  33. }
  34. public void testSwitchPatternMatchingPreview3Error2() {
  35. runTest("switch pattern matching preview 3 error 2");
  36. }
  37. public static Test suite() {
  38. return XMLBasedAjcTestCase.loadSuite(Java19PreviewFeaturesTests.class);
  39. }
  40. @Override
  41. protected java.net.URL getSpecFile() {
  42. return getClassResource("ajc1919.xml");
  43. }
  44. }