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.

Ajc197PreviewFeaturesTests.java 1.6KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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 v1.0
  5. * which accompanies this distribution, and is available at
  6. * http://www.eclipse.org/legal/epl-v10.html
  7. *******************************************************************************/
  8. package org.aspectj.systemtest.ajc197;
  9. import junit.framework.Test;
  10. import org.aspectj.apache.bcel.Constants;
  11. import org.aspectj.testing.XMLBasedAjcTestCase;
  12. import org.aspectj.testing.XMLBasedAjcTestCaseForJava15Only;
  13. /**
  14. * @author Alexander Kriegisch
  15. */
  16. public class Ajc197PreviewFeaturesTests extends XMLBasedAjcTestCaseForJava15Only {
  17. public void testRecords() {
  18. runTest("simple record");
  19. checkVersion("Person", Constants.MAJOR_15, Constants.PREVIEW_MINOR_VERSION);
  20. }
  21. public void testRecords2() {
  22. runTest("using a record");
  23. }
  24. public void testInstanceofPatterns() {
  25. runTest("instanceof patterns");
  26. }
  27. public void testAdvisingRecords() {
  28. runTest("advising records");
  29. }
  30. public void testSealedClassWithLegalSubclasses() {
  31. runTest("sealed class with legal subclasses");
  32. }
  33. public void testSealedClassWithIllegalSubclass() {
  34. runTest("sealed class with illegal subclass");
  35. }
  36. public void testWeaveSealedClass() {
  37. runTest("weave sealed class");
  38. }
  39. public static Test suite() {
  40. return XMLBasedAjcTestCase.loadSuite(Ajc197PreviewFeaturesTests.class);
  41. }
  42. @Override
  43. protected java.net.URL getSpecFile() {
  44. return getClassResource("ajc197.xml");
  45. }
  46. }