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.

Ajc153Tests.java 5.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. /*******************************************************************************
  2. * Copyright (c) 2006 IBM
  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. * Contributors:
  9. * Andy Clement - initial API and implementation
  10. *******************************************************************************/
  11. package org.aspectj.systemtest.ajc153;
  12. import java.io.File;
  13. import junit.framework.Test;
  14. import org.aspectj.testing.Utils;
  15. import org.aspectj.testing.XMLBasedAjcTestCase;
  16. import org.aspectj.weaver.bcel.Utility;
  17. public class Ajc153Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
  18. //public void testGenericsProblem_pr151978() { runTest("generics problem");}
  19. //public void testMissingLineNumbersInStacktraceBefore_pr145442() { runTest("missing line numbers in stacktrace before");}
  20. //public void testMissingLineNumbersInStacktraceAfter_pr145442() { runTest("missing line numbers in stacktrace after");}
  21. //public void testMissingLineNumbersInStacktraceAround_pr145442() { runTest("missing line numbers in stacktrace around");}
  22. // public void testArgnamesAndJavac_pr148381() { runTest("argNames and javac");}
  23. // public void testCFlowXMLAspectLTW_pr149096() { runTest("cflow xml concrete aspect"); }
  24. // public void testAmbiguousBinding_pr121805() { runTest("ambiguous binding");}
  25. public void testMixingGenerics_pr152848() { runTest("mixing generics"); }
  26. public void testIncorrectStaticinitializationWeaving_pr149560_1() { runTest("incorrect staticinitialization weaving - codestyle");}
  27. public void testIncorrectStaticinitializationWeaving_pr149560_2() { runTest("incorrect staticinitialization weaving - annstyle");}
  28. public void testIncorrectDeprecatedAnnotationProcessing_pr154332() { runTest("incorrect deprecated annotation processing");}
  29. public void testPipeliningProblemWithAnnotationsDecp_pr153380_1() { runTest("pipelining decps");}
  30. public void testUnwantedPointcutWarning_pr148219() { runTest("unwanted warning for pointcut");}
  31. public void testDecpAndCflowadderMungerClash_pr152631() { runTest("decp and cflowadder munger clash");}
  32. public void testGenericInheritanceDecp_pr150095() { runTest("generics, inheritance and decp");}
  33. public void testIllegalStateException_pr148737() { runTest("illegalstateexception for non generic type");}
  34. public void testAtajInheritance_pr149305_1() { runTest("ataj inheritance - 1");}
  35. public void testAtajInheritance_pr149305_2() { runTest("ataj inheritance - 2");}
  36. public void testAtajInheritance_pr149305_3() { runTest("ataj inheritance - 3");}
  37. public void testVerificationFailureForAspectOf_pr148693() {
  38. runTest("verification problem"); // build the code
  39. Utils.verifyClass(ajc,"mypackage.MyAspect"); // verify it <<< BRAND NEW VERIFY UTILITY FOR EVERYONE TO TRY ;)
  40. }
  41. public void testIncorrectAnnotationValue_pr148537() { runTest("incorrect annotation value");}
  42. public void testVerifyErrNoTypeCflowField_pr145693_1() { runTest("verifyErrNoTypeCflowField"); }
  43. public void testVerifyErrInpathNoTypeCflowField_pr145693_2() { runTest("verifyErrInpathNoTypeCflowField"); }
  44. public void testCpathNoTypeCflowField_pr145693_3() { runTest("cpathNoTypeCflowField"); }
  45. // public void testVisibilityProblem_pr149071() { runTest("visibility problem");}
  46. // public void testAdviceNotWovenAspectPath_pr147841() { runTest("advice not woven on aspectpath");}
  47. public void testGenericSignatures_pr148409() { runTest("generic signature problem"); }
  48. // public void testBrokenIfArgsCflowAtAj_pr145018() { runTest("ataj crashing with cflow, if and args");}
  49. public void testCantFindType_pr149322_01() {runTest("can't find type on interface call 1");}
  50. public void testCantFindType_pr149322_02() {runTest("can't find type on interface call 2");}
  51. public void testCantFindType_pr149322_03() {runTest("can't find type on interface call 3");}
  52. public void testParsingBytecodeLess_pr152871() {
  53. Utility.testingParseCounter=0;
  54. runTest("parsing bytecode less");
  55. assertTrue("Should have called parse 5 times, not "+Utility.testingParseCounter+" times",Utility.testingParseCounter==5);
  56. // 5 means:
  57. // (1)=registerAspect
  58. // (2,3)=checkingIfShouldWeave,AcceptingResult for class
  59. // (4,5)=checkingIfShouldWeave,AcceptingResult for aspect
  60. }
  61. public void testMatchVolatileField_pr150671() {runTest("match volatile field");};
  62. public void testDuplicateJVMTIAgents_pr151938() {runTest("Duplicate JVMTI agents");};
  63. public void testLTWWorldWithAnnotationMatching_pr153572() { runTest("LTWWorld with annotation matching");}
  64. public void testReweavableAspectNotRegistered_pr129525 () {
  65. runTest("reweavableAspectNotRegistered error");
  66. }
  67. public void testNPEinConstructorSignatureImpl_pr155972 () {
  68. runTest("NPE in ConstructorSignatureImpl");
  69. }
  70. public void testNPEinFieldSignatureImpl_pr155972 () {
  71. runTest("NPE in FieldSignatureImpl");
  72. }
  73. public void testNPEinInitializerSignatureImpl_pr155972 () {
  74. runTest("NPE in InitializerSignatureImpl");
  75. }
  76. /////////////////////////////////////////
  77. public static Test suite() {
  78. return XMLBasedAjcTestCase.loadSuite(Ajc153Tests.class);
  79. }
  80. protected File getSpecFile() {
  81. return new File("../tests/src/org/aspectj/systemtest/ajc153/ajc153.xml");
  82. }
  83. }