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.

Java17PreviewFeaturesTests.java 1.6KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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.ajc198;
  9. import junit.framework.Test;
  10. import org.aspectj.apache.bcel.Constants;
  11. import org.aspectj.testing.XMLBasedAjcTestCase;
  12. import org.aspectj.testing.XMLBasedAjcTestCaseForJava17Only;
  13. /**
  14. * @author Alexander Kriegisch
  15. */
  16. public class Java17PreviewFeaturesTests extends XMLBasedAjcTestCaseForJava17Only {
  17. /*
  18. public void testSealedClassWithLegalSubclasses() {
  19. runTest("sealed class with legal subclasses");
  20. checkVersion("Employee", Constants.MAJOR_16, Constants.PREVIEW_MINOR_VERSION);
  21. checkVersion("Manager", Constants.MAJOR_16, Constants.PREVIEW_MINOR_VERSION);
  22. }
  23. public void testSealedClassWithIllegalSubclass() {
  24. runTest("sealed class with illegal subclass");
  25. checkVersion("Person", Constants.MAJOR_16, Constants.PREVIEW_MINOR_VERSION);
  26. }
  27. public void testWeaveSealedClass() {
  28. runTest("weave sealed class");
  29. checkVersion("PersonAspect", Constants.MAJOR_16, Constants.PREVIEW_MINOR_VERSION);
  30. }
  31. */
  32. public static Test suite() {
  33. return XMLBasedAjcTestCase.loadSuite(Java17PreviewFeaturesTests.class);
  34. }
  35. @Override
  36. protected java.net.URL getSpecFile() {
  37. return getClassResource("ajc198.xml");
  38. }
  39. }