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.

Java14PreviewFeaturesTests.java 1.6KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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.ajc196;
  9. import org.aspectj.apache.bcel.Constants;
  10. import org.aspectj.testing.XMLBasedAjcTestCase;
  11. import org.aspectj.testing.XMLBasedAjcTestCaseForJava14Only;
  12. import junit.framework.Test;
  13. /**
  14. * @author Alexander Kriegisch
  15. */
  16. public class Java14PreviewFeaturesTests extends XMLBasedAjcTestCaseForJava14Only {
  17. private static final Constants.ClassFileVersion classFileVersion = Constants.ClassFileVersion.of(14);
  18. public void testRecords() {
  19. runTest("simple record");
  20. checkVersion("Person", classFileVersion.MAJOR, classFileVersion.PREVIEW_MINOR);
  21. }
  22. public void testRecords2() {
  23. runTest("using a record");
  24. }
  25. public void testInstanceofPatterns() {
  26. runTest("instanceof patterns");
  27. }
  28. public void testAdvisingRecords() {
  29. runTest("advising records");
  30. }
  31. public void testTextBlock1() {
  32. runTest("textblock 1");
  33. }
  34. public void testTextBlock2() {
  35. runTest("textblock 2");
  36. }
  37. public static Test suite() {
  38. return XMLBasedAjcTestCase.loadSuite(Java14PreviewFeaturesTests.class);
  39. }
  40. @Override
  41. protected java.net.URL getSpecFile() {
  42. return getClassResource("ajc196.xml");
  43. }
  44. }