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.7KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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 testRecords() {
  18. runTest("simple record");
  19. checkVersion("Person", Constants.MAJOR_14, 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 testSwitch1() {
  31. runTest("switch 1");
  32. checkVersion("Switch1", Constants.MAJOR_14, 0);
  33. }
  34. public void testSwitch2() {
  35. runTest("switch 2");
  36. checkVersion("Switch2", Constants.MAJOR_14, 0);
  37. }
  38. public void testSwitch3() {
  39. runTest("switch 3");
  40. checkVersion("Switch3", Constants.MAJOR_14, 0);
  41. }
  42. public void testTextBlock1() {
  43. runTest("textblock 1");
  44. }
  45. public void testTextBlock2() {
  46. runTest("textblock 2");
  47. }
  48. // ---
  49. public static Test suite() {
  50. return XMLBasedAjcTestCase.loadSuite(Ajc196Tests.class);
  51. }
  52. @Override
  53. protected java.net.URL getSpecFile() {
  54. return getClassResource("ajc196.xml");
  55. }
  56. }