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.

Bugs199Tests.java 2.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. /*******************************************************************************
  2. * Copyright (c) 2022 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.ajc199;
  9. import io.bmuskalla.system.properties.PropertyEnvironment;
  10. import io.bmuskalla.system.properties.ScopedSystemProperties;
  11. import junit.framework.Test;
  12. import org.aspectj.testing.XMLBasedAjcTestCase;
  13. /**
  14. * @author Alexander Kriegisch
  15. */
  16. public class Bugs199Tests extends XMLBasedAjcTestCase {
  17. public void testAnnotationStyleSpecialIfClauses() {
  18. runTest("annotation style A");
  19. }
  20. public void testAnnotationStylePointcutInheritanceWithIfClauses() {
  21. runTest("annotation style B");
  22. }
  23. public void testAnnotationStyleSpecialIfClauses2_gh120() {
  24. runTest("annotation style C");
  25. }
  26. public void testAnnotationStyleSpecialIfClauses3_gh120() {
  27. runTest("annotation style D");
  28. }
  29. public void testAnnotationStyleNegatedIf_gh122() {
  30. runTest("annotation style negated if");
  31. }
  32. public void testCompilerCanReopenClosedJARs_gh125() {
  33. try (PropertyEnvironment env = ScopedSystemProperties.newPropertyEnvironment()) {
  34. env.setProperty("org.aspectj.weaver.openarchives", "20");
  35. runTest("compiler can re-open closed JARs");
  36. }
  37. }
  38. public void testAsyncProceedNestedAroundAdvice_gh128() {
  39. runTest("asynchronous proceed for nested around-advice (@AspectJ)");
  40. }
  41. public void testAsyncProceedNestedAroundAdviceThreadPool_gh128() {
  42. // Test created for #128, but initially commented out and remaining work recorded in #141.
  43. // Now, test is expected to pass. See https://github.com/eclipse-aspectj/aspectj/issues/141.
  44. runTest("asynchronous proceed for nested around-advice (@AspectJ, thread pool)");
  45. }
  46. public void testAsyncProceedNestedAroundAdviceNative_gh128() {
  47. runTest("asynchronous proceed for nested around-advice (native)");
  48. }
  49. public void testAsyncProceedNestedAroundAdviceNativeThreadPool_gh128() {
  50. runTest("asynchronous proceed for nested around-advice (native, thread pool)");
  51. }
  52. public void testAddExports_gh145() {
  53. runTest("use --add-exports");
  54. }
  55. public void testAddReads_gh145() {
  56. runTest("use --add-reads");
  57. }
  58. public void testAddModules_gh145() {
  59. runTest("use --add-modules");
  60. }
  61. public void testAddModulesJDK_gh145() {
  62. runTest("use --add-modules with non-public JDK module");
  63. }
  64. public static Test suite() {
  65. return XMLBasedAjcTestCase.loadSuite(Bugs199Tests.class);
  66. }
  67. @Override
  68. protected java.net.URL getSpecFile() {
  69. return getClassResource("ajc199.xml");
  70. }
  71. }