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.

Ajc196Tests.java 1.5KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /*******************************************************************************
  2. * Copyright (c) 2020 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.ajc196;
  9. import org.aspectj.apache.bcel.Constants;
  10. import org.aspectj.testing.XMLBasedAjcTestCase;
  11. import org.aspectj.testing.XMLBasedAjcTestCaseForJava14OrLater;
  12. import junit.framework.Test;
  13. /**
  14. * @author Andy Clement
  15. */
  16. public class Ajc196Tests extends XMLBasedAjcTestCaseForJava14OrLater {
  17. public void testNPE_558995() {
  18. runTest("early resolution of supporting interfaces");
  19. }
  20. public void testRecords() {
  21. runTest("simple record");
  22. checkVersion("Person", Constants.MAJOR_14, Constants.PREVIEW_MINOR_VERSION);
  23. }
  24. public void testSwitch1() {
  25. runTest("switch 1");
  26. checkVersion("Switch1", Constants.MAJOR_14, 0);
  27. }
  28. public void testSwitch2() {
  29. runTest("switch 2");
  30. checkVersion("Switch2", Constants.MAJOR_14, 0);
  31. }
  32. public void testSwitch3() {
  33. runTest("switch 3");
  34. checkVersion("Switch3", Constants.MAJOR_14, 0);
  35. }
  36. // ---
  37. public static Test suite() {
  38. return XMLBasedAjcTestCase.loadSuite(Ajc196Tests.class);
  39. }
  40. @Override
  41. protected java.net.URL getSpecFile() {
  42. return getClassResource("ajc196.xml");
  43. }
  44. }