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.

AtAjSyntaxTests.java 3.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. /*******************************************************************************
  2. * Copyright (c) 2005 Contributors.
  3. * All rights reserved.
  4. * This program and the accompanying materials are made available
  5. * under the terms of the Eclipse Public License v1.0
  6. * which accompanies this distribution and is available at
  7. * http://eclipse.org/legal/epl-v10.html
  8. *
  9. * Contributors:
  10. * initial implementation Alexandre Vasseur
  11. *******************************************************************************/
  12. package org.aspectj.systemtest.ajc150.ataspectj;
  13. import org.aspectj.testing.XMLBasedAjcTestCase;
  14. import junit.framework.Test;
  15. /**
  16. * A suite for @AspectJ aspects located in java5/ataspectj
  17. *
  18. * @author <a href="mailto:alex AT gnilux DOT com">Alexandre Vasseur</a>
  19. */
  20. public class AtAjSyntaxTests extends XMLBasedAjcTestCase {
  21. public static Test suite() {
  22. return XMLBasedAjcTestCase.loadSuite(AtAjSyntaxTests.class);
  23. }
  24. protected java.net.URL getSpecFile() {
  25. return getClassResource("syntax.xml");
  26. }
  27. public void testSimpleBefore() {
  28. runTest("SimpleBefore");
  29. }
  30. public void testSimpleAfter() {
  31. runTest("SimpleAfter");
  32. }
  33. public void testSingletonAspectBindings() {
  34. // Note AV: uncomment setReporting to get it in modules/tests folder
  35. // org.aspectj.asm.AsmManager.setReporting("debug.txt",true,true,true,true);
  36. runTest("singletonAspectBindings");
  37. // same stuff with AJ
  38. // org.aspectj.asm.AsmManager.setReporting("debug-aj.txt",true,true,true,true);
  39. // runTest("singletonAspectBindings2");
  40. }
  41. public void testCflowTest() {
  42. runTest("CflowTest");
  43. }
  44. public void testPointcutReferenceTest() {
  45. runTest("PointcutReferenceTest");
  46. }
  47. public void testXXJoinPointTest() {
  48. runTest("XXJoinPointTest");
  49. }
  50. public void testPrecedenceTest() {
  51. runTest("PrecedenceTest");
  52. }
  53. public void testAfterXTest() {
  54. runTest("AfterXTest");
  55. }
  56. public void testBindingTest() {
  57. runTest("BindingTest");
  58. }
  59. public void testBindingTestNoInline() {
  60. runTest("BindingTest no inline");
  61. }
  62. public void testPerClause() {
  63. runTest("PerClause");
  64. }
  65. public void testAroundInlineMunger_XnoInline() {
  66. runTest("AroundInlineMunger -XnoInline");
  67. }
  68. public void testAroundInlineMunger() {
  69. try {
  70. runTest("AroundInlineMunger");
  71. } finally {
  72. System.out.println(ajc.getLastCompilationResult().getStandardError());
  73. }
  74. }
  75. public void testAroundInlineMunger2() {
  76. runTest("AroundInlineMunger2");
  77. }
  78. public void testDeow() {
  79. runTest("Deow");
  80. }
  81. public void testSingletonInheritance() {
  82. runTest("singletonInheritance");
  83. }
  84. public void testPerClauseInheritance() {
  85. runTest("perClauseInheritance");
  86. }
  87. public void testIfPointcut() {
  88. runTest("IfPointcutTest");
  89. }
  90. public void testIfPointcut2() {
  91. runTest("IfPointcut2Test");
  92. }
  93. public void testMultipleBinding() {
  94. runTest("MultipleBinding");
  95. }
  96. public void testBug104212() {
  97. runTest("Bug104212");
  98. }
  99. public void testDeclareParentsInterface() {
  100. runTest("DeclareParentsInterface");
  101. }
  102. public void testDeclareParentsImplements() {
  103. runTest("DeclareParentsImplements");
  104. }
  105. public void testAbstractAspectNPE() {
  106. runTest("AbstractAspectNPE");
  107. }
  108. public void testAbstractInherited() {
  109. runTest("AbstractInherited");
  110. }
  111. }