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.

Ajc150Tests.java 29KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026
  1. /*******************************************************************************
  2. * Copyright (c) 2004 IBM
  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. * Contributors:
  9. * Andy Clement - initial API and implementation
  10. *******************************************************************************/
  11. package org.aspectj.systemtest.ajc150;
  12. import java.io.ByteArrayOutputStream;
  13. import java.io.IOException;
  14. import java.io.PrintWriter;
  15. import org.aspectj.apache.bcel.classfile.JavaClass;
  16. import org.aspectj.apache.bcel.classfile.Method;
  17. import org.aspectj.apache.bcel.classfile.Signature;
  18. import org.aspectj.asm.AsmManager;
  19. import org.aspectj.testing.XMLBasedAjcTestCase;
  20. import junit.framework.Test;
  21. public class Ajc150Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
  22. public static Test suite() {
  23. return XMLBasedAjcTestCase.loadSuite(Ajc150Tests.class);
  24. }
  25. protected java.net.URL getSpecFile() {
  26. return getClassResource("ajc150.xml");
  27. }
  28. public void testMixingCodeStyles_pr121385() {
  29. runTest("mixing aspect styles");
  30. }
  31. public void testTypeVars_pr121575() {
  32. runTest("different numbers of type vars");
  33. }
  34. public void testTypeVars_pr121575_2() {
  35. runTest("different numbers of type vars - 2");
  36. }
  37. public void testTypeVars_pr121575_3() {
  38. runTest("different numbers of type vars - 3");
  39. }
  40. public void testTypeVars_pr121575_4() {
  41. runTest("different numbers of type vars - 4");
  42. }
  43. public void testDecps1() {
  44. runTest("decps - 1");
  45. }
  46. public void testDecps1b() {
  47. runTest("decps - 1b");
  48. }
  49. public void testDecps2() {
  50. runTest("decps - 2");
  51. }
  52. public void testDecps2b() {
  53. runTest("decps - 2b");
  54. }
  55. public void testDecps3() {
  56. runTest("decps - 3");
  57. }
  58. public void testDecps3b() {
  59. runTest("decps - 3b");
  60. }
  61. public void testDecps3c() {
  62. runTest("decps - 3c");
  63. }
  64. public void testVarargsNPE_pr120826() {
  65. runTest("varargs NPE");
  66. }
  67. public void testNamedPointcutPertarget_pr120521() {
  68. runTest("named pointcut not resolved in pertarget pointcut");
  69. }
  70. public void testDollarClasses_pr120474() {
  71. runTest("Dollar classes");
  72. }
  73. public void testGenericPTW_pr119539_1() {
  74. runTest("generic pertypewithin aspect - 1");
  75. }
  76. public void testGenericPTW_pr119539_2() {
  77. runTest("generic pertypewithin aspect - 2");
  78. }
  79. public void testGenericPTW_pr119539_3() {
  80. runTest("generic pertypewithin aspect - 3");
  81. }
  82. /*
  83. * public void testBrokenDispatchByITD_pr72834() { runTest("broken dispatch");} public void testMissingAccessor_pr73856() {
  84. * runTest("missing accessor");} public void testCunningDeclareParents_pr92311() { runTest("cunning declare parents");} public
  85. * void testGenericITDsAndAbstractMethodError_pr102357() { runTest("generic itds and abstract method error");}
  86. */
  87. public void testIncorrectSignatureMatchingWithExceptions_pr119749() {
  88. runTest("incorrect exception signature matching");
  89. }
  90. public void testGeneratingCodeForAnOldRuntime_pr116679_1() {
  91. runTest("generating code for a 1.2.1 runtime - 1");
  92. }
  93. public void testGeneratingCodeForAnOldRuntime_pr116679_2() {
  94. runTest("generating code for a 1.2.1 runtime - 2");
  95. }
  96. public void testAmbiguousMethod_pr118599_1() {
  97. runTest("ambiguous method when binary weaving - 1");
  98. }
  99. public void testAmbiguousMethod_pr118599_2() {
  100. runTest("ambiguous method when binary weaving - 2");
  101. }
  102. public void testAroundAdviceArrayAdviceSigs_pr118781() {
  103. runTest("verify error with around advice array sigs");
  104. }
  105. public void testAtDeclareParents_pr117681() {
  106. runTest("at declare parents");
  107. }
  108. public void testPrivilegeProblem_pr87525() {
  109. runTest("privilege problem with switch");
  110. }
  111. public void testRangeProblem_pr109614() {
  112. runTest("Range problem");
  113. }
  114. public void testGenericAspects_pr115237() {
  115. runTest("aspectOf and generic aspects");
  116. }
  117. public void testClassFormatError_pr114436() {
  118. runTest("ClassFormatError binary weaving perthis");
  119. }
  120. public void testParserException_pr115788() {
  121. runTest("parser exception");
  122. }
  123. public void testPossibleStaticImports_pr113066_1() {
  124. runTest("possible static imports bug - 1");
  125. }
  126. public void testPossibleStaticImports_pr113066_2() {
  127. runTest("possible static imports bug - 2");
  128. }
  129. public void testPossibleStaticImports_pr113066_3() {
  130. runTest("possible static imports bug - 3");
  131. }
  132. public void testITDCtor_pr112783() {
  133. runTest("Problem with constructor ITDs");
  134. }
  135. public void testAnnotatedITDFs_pr114005_1() {
  136. runTest("Annotated ITDFs - 1");
  137. }
  138. public void testAnnotatedITDFs_pr114005_2() {
  139. runTest("Annotated ITDFs - 2");
  140. }
  141. public void testCantCallSuperMethods_pr90143() {
  142. runTest("cant call super methods");
  143. }
  144. public void testBrokenDecp_pr112476() {
  145. runTest("binary weaving decp broken");
  146. }
  147. public void testUnboundFormal_pr112027() {
  148. runTest("unexpected error unboundFormalInPC");
  149. }
  150. public void testNPEScopeSetup_pr115038() {
  151. runTest("NPE in ensureScopeSetup");
  152. }
  153. public void testCCEGenerics_pr113445() {
  154. runTest("Generics ClassCastException");
  155. }
  156. public void testMatthewsAspect_pr113947_1() {
  157. runTest("maws generic aspect - 1");
  158. }
  159. public void testMatthewsAspect_pr113947_2() {
  160. runTest("maws generic aspect - 2");
  161. }
  162. public void testFieldGet_pr114343() {
  163. runTest("field-get, generics and around advice");
  164. }
  165. public void testFieldGet_pr114343_2() {
  166. runTest("field-get, generics and around advice - 2");
  167. }
  168. public void testFieldGet_pr114343_3() {
  169. runTest("field-get, generics and around advice - 3");
  170. }
  171. public void testCaptureBinding_pr114744() {
  172. runTest("capturebinding wildcard problem");
  173. }
  174. public void testAutoboxingAroundAdvice_pr119210_1() {
  175. runTest("autoboxing around advice - 1");
  176. }
  177. public void testAutoboxingAroundAdvice_pr119210_2() {
  178. runTest("autoboxing around advice - 2");
  179. }
  180. public void testAutoboxingAroundAdvice_pr119210_3() {
  181. runTest("autoboxing around advice - 3");
  182. }
  183. public void testBadDecp_pr110788_1() {
  184. runTest("bad generic decp - 1");
  185. }
  186. public void testBadDecp_pr110788_2() {
  187. runTest("bad generic decp - 2");
  188. }
  189. public void testBadDecp_pr110788_3() {
  190. runTest("bad generic decp - 3");
  191. }
  192. public void testBadDecp_pr110788_4() {
  193. runTest("bad generic decp - 4");
  194. }
  195. // public void testSimplifiedGenericAspectITDTest() { runTest("spurious override method warning - 3");}
  196. // public void testSpuriousOverrideMethodWarning_pr119570_1() { runTest("spurious override method warning");}
  197. // public void testSpuriousOverrideMethodWarning_pr119570_2() { runTest("spurious override method warning - 2");}
  198. public void testBrokenSwitch_pr117854() {
  199. runTest("broken switch transform");
  200. }
  201. public void testVarargsITD_pr110906() {
  202. runTest("ITD varargs problem");
  203. }
  204. public void testBadRenderer_pr86903() {
  205. runTest("bcelrenderer bad");
  206. }
  207. // public void testIllegalInitialization_pr118326_1() { runTest("illegal initialization - 1");}
  208. // public void testIllegalInitialization_pr118326_2() { runTest("illegal initialization - 2");}
  209. public void testLintForAdviceSorting_pr111667() {
  210. runTest("lint for advice sorting");
  211. }
  212. public void testIncompatibleClassChangeError_pr113630_1() {
  213. runTest("IncompatibleClassChangeError - errorscenario");
  214. }
  215. public void testIncompatibleClassChangeError_pr113630_2() {
  216. runTest("IncompatibleClassChangeError - workingscenario");
  217. }
  218. public void testFieldGetProblemWithGenericField_pr113861() {
  219. runTest("field-get problems with generic field");
  220. }
  221. public void testAccesstoPrivateITDInNested_pr118698() {
  222. runTest("access to private ITD from nested type");
  223. }
  224. public void testDeclareAnnotationOnNonExistentType_pr99191_1() {
  225. runTest("declare annotation on non existent type - 1");
  226. }
  227. public void testDeclareAnnotationOnNonExistentType_pr99191_2() {
  228. runTest("declare annotation on non existent type - 2");
  229. }
  230. public void testDeclareAnnotationOnNonExistentType_pr99191_3() {
  231. runTest("declare annotation on non existent type - 3");
  232. }
  233. public void testDeclareAnnotationOnNonExistentType_pr99191_4() {
  234. runTest("declare annotation on non existent type - 4");
  235. }
  236. public void testDeclareAnnotationOnNonExistentType_pr99191_5() {
  237. runTest("declare annotation on non existent type - 5");
  238. }
  239. public void testBadGenericSigAttribute_pr110927() {
  240. runTest("cant create signature attribute");
  241. Signature sig = GenericsTests.getClassSignature(ajc, "I");
  242. if (sig == null)
  243. fail("Couldn't find signature attribute for type I");
  244. String sigString = sig.getSignature();
  245. if (!(sigString.equals("Ljava/lang/Object;LIE2;LIE1<Ljava/lang/String;>;") || sigString
  246. .equals("Ljava/lang/Object;LIE1<Ljava/lang/String;>;LIE2;"))) {
  247. fail("Signature was " + sigString
  248. + " when should have been something like Ljava/lang/Object;LIE1<Ljava/lang/String;>;LIE2;");
  249. }
  250. }
  251. public void test_typeProcessingOrderWhenDeclareParents() {
  252. runTest("Order of types passed to compiler determines weaving behavior");
  253. }
  254. public void test_aroundMethod() {
  255. runTest("method called around in class");
  256. }
  257. public void test_aroundMethodAspect() {
  258. runTest("method called around in aspect");
  259. }
  260. public void test_ambiguousBindingsDetection() {
  261. runTest("Various kinds of ambiguous bindings");
  262. }
  263. public void test_ambiguousArgsDetection() {
  264. runTest("ambiguous args");
  265. }
  266. public void testIncorrectExceptionTableWhenBreakInMethod_pr78021() {
  267. runTest("Injecting exception into while loop with break statement causes catch block to be ignored");
  268. }
  269. public void testIncorrectExceptionTableWhenReturnInMethod_pr79554() {
  270. runTest("Return in try-block disables catch-block if final-block is present");
  271. }
  272. public void testMissingDebugInfoForGeneratedMethods_pr82570() throws ClassNotFoundException {
  273. runTest("Weaved code does not include debug lines");
  274. boolean f = false;
  275. JavaClass jc = getClassFrom(ajc.getSandboxDirectory(), "PR82570_1");
  276. Method[] meths = jc.getMethods();
  277. for (Method method : meths) {
  278. if (f)
  279. System.err.println("Line number table for " + method.getName() + method.getSignature() + " = "
  280. + method.getLineNumberTable());
  281. assertTrue("Didn't find a line number table for method " + method.getName() + method.getSignature(),
  282. method.getLineNumberTable() != null);
  283. }
  284. // This test would determine the info isn't there if you pass -g:none ...
  285. // cR = ajc(baseDir,new String[]{"PR82570_1.java","-g:none"});
  286. // assertTrue("Expected no compile problem:"+cR,!cR.hasErrorMessages());
  287. // System.err.println(cR.getStandardError());
  288. // jc = getClassFrom(ajc.getSandboxDirectory(),"PR82570_1");
  289. // meths = jc.getMethods();
  290. // for (int i = 0; i < meths.length; i++) {
  291. // Method method = meths[i];
  292. // assertTrue("Found a line number table for method "+method.getName(),
  293. // method.getLineNumberTable()==null);
  294. // }
  295. }
  296. public void testCanOverrideProtectedMethodsViaITDandDecp_pr83303() {
  297. runTest("compiler error when mixing inheritance, overriding and polymorphism");
  298. }
  299. public void testPerTypeWithin_pr106554() {
  300. runTest("Problem in staticinitialization with pertypewithin aspect");
  301. }
  302. public void testPerTypeWithinMissesNamedInnerTypes() {
  303. runTest("pertypewithin() handing of inner classes (1)");
  304. }
  305. public void testPerTypeWithinMissesAnonymousInnerTypes() {
  306. runTest("pertypewithin() handing of inner classes (2)");
  307. }
  308. public void testPerTypeWithinIncorrectlyMatchingInterfaces() {
  309. runTest("pertypewithin({interface}) illegal field modifier");
  310. }
  311. public void test051_arrayCloningInJava5() {
  312. runTest("AJC possible bug with static nested classes");
  313. }
  314. public void testBadASMforEnums() throws IOException {
  315. runTest("bad asm for enums");
  316. ByteArrayOutputStream baos = new ByteArrayOutputStream();
  317. PrintWriter pw = new PrintWriter(baos);
  318. AsmManager.dumptree(pw, AsmManager.lastActiveStructureModel.getHierarchy().getRoot(), 0);
  319. pw.flush();
  320. String tree = baos.toString();
  321. assertTrue("Expected 'Red [enumvalue]' somewhere in here:" + tree, tree.contains("Red [enumvalue]"));
  322. }
  323. public void npeOnTypeNotFound() {
  324. runTest("structure model npe on type not found");
  325. }
  326. public void testNoRuntimeExceptionSoftening() {
  327. runTest("declare soft of runtime exception");
  328. }
  329. public void testRuntimeNoSoftenWithHandler() {
  330. runTest("declare soft w. catch block");
  331. }
  332. public void testSyntaxError() {
  333. runTest("invalid cons syntax");
  334. }
  335. public void testVarargsInConsBug() {
  336. runTest("varargs in constructor sig");
  337. }
  338. public void testAspectpathdirs() {
  339. runTest("dirs on aspectpath");
  340. }
  341. public void testIntroSample() {
  342. runTest("introduction sample");
  343. }
  344. public void testPTWInterface() {
  345. runTest("pertypewithin({interface}) illegal field modifier");
  346. }
  347. public void testEnumCalledEnumEtc() {
  348. runTest("enum called Enum, annotation called Annotation, etc");
  349. }
  350. public void testInternalCompilerError_pr86832() {
  351. runTest("Internal compiler error");
  352. }
  353. public void testCloneMethod_pr83311() {
  354. runTest("overriding/polymorphism error on interface method introduction");
  355. }
  356. // IfPointcut.findResidueInternal() was modified to make this test complete in a short amount
  357. // of time - if you see it hanging, someone has messed with the optimization.
  358. public void testIfEvaluationExplosion_pr94086() {
  359. runTest("Exploding compile time with if() statements in pointcut");
  360. }
  361. public void testReflectNPE_pr94167() {
  362. runTest("NPE in reflect implementation");
  363. }
  364. public void testStaticImports_pr84260() {
  365. runTest("static import failures");
  366. }
  367. public void testGenerics_pr99089() {
  368. runTest("ArrayIndexOutOfBoundsException - Generics in privileged aspects");
  369. }
  370. public void testGenerics_pr95993() {
  371. runTest("NPE at ClassScope.java:660 when compiling generic class");
  372. }
  373. public void testItdGenerics_pr99228() {
  374. runTest("ITD of a field into a generic class");
  375. }
  376. public void testItdGenerics_pr98320() {
  377. runTest("intertype with nested generic type");
  378. }
  379. public void testItdGenerics_pr100227() {
  380. runTest("inner class with generic enclosing class");
  381. }
  382. public void testItdGenerics_pr100260() {
  383. runTest("methods inherited from a generic parent");
  384. }
  385. public void testSyntaxErrorNPE_pr103266() {
  386. runTest("NPE on syntax error");
  387. }
  388. public void testFinalAbstractClass_pr109486() {
  389. runTest("Internal compiler error (ClassParser.java:242)");
  390. }
  391. public void testComplexBinding_pr102210() {
  392. runTest("NullPointerException trying to compile");
  393. }
  394. public void testIllegalStateExceptionOnNestedParameterizedType_pr106634() {
  395. runTest("IllegalStateException unpacking signature of nested parameterized type");
  396. }
  397. public void testParseErrorOnAnnotationStarPlusPattern() {
  398. runTest("(@Foo *)+ type pattern parse error");
  399. }
  400. public void test_pr106130_tooManyLocals() {
  401. runTest("test weaving with > 256 locals");
  402. }
  403. public void testMissingNamePattern_pr106461() {
  404. runTest("missing name pattern");
  405. }
  406. public void testMissingNamePattern_pr107059() {
  407. runTest("parser crashes on call(void (@a *)(..)");
  408. }
  409. public void testIntermediateAnnotationMatching() {
  410. runTest("intermediate annotation matching");
  411. }
  412. public void testBadRuntimeTestGeneration() {
  413. runTest("target(@Foo *)");
  414. }
  415. // ONE_EIGHT remove for now, needs some grammar changes to ensure empty type annotations are put in place for later consumption
  416. // public void testErrorMessageOnITDWithTypePatterns() {
  417. // runTest("clear error message on itd with type pattern");
  418. // }
  419. public void testAjKeywordsAsIdentifiers() {
  420. runTest("before and after are valid identifiers in classes");
  421. }
  422. public void testAjKeywordsAsIdentifiers2() {
  423. runTest("before and after are valid identifiers in classes, part 2");
  424. }
  425. public void testNoBeforeReturningAdvice() {
  426. runTest("before returning advice not allowed!");
  427. }
  428. public void testDetectVoidFieldType() {
  429. runTest("void field type in pointcut expression");
  430. }
  431. public void testPointcutOverriding() {
  432. runTest("overriding final pointcut from super-aspect");
  433. }
  434. public void testAtSuppressWarnings() {
  435. runTest("@SuppressWarnings should suppress");
  436. }
  437. public void testDEOWWithBindingPointcut() {
  438. runTest("declare warning : foo(str) : ...;");
  439. }
  440. public void testAroundAdviceAndInterfaceInitializer() {
  441. runTest("around advice on interface initializer");
  442. }
  443. public void testGoodErrorMessageOnUnmatchedMemberSyntax() {
  444. runTest("good error message for unmatched member syntax");
  445. }
  446. public void testITDWithNoExceptionAndIntermediary() {
  447. runTest("itd override with no exception clause");
  448. }
  449. public void testAnonymousInnerClasses() {
  450. runTest("anonymous inner classes");
  451. }
  452. public void testMultipleAnonymousInnerClasses() {
  453. runTest("multiple anonymous inner classes");
  454. }
  455. public void testPrivilegedMethodAccessorsGetRightExceptions_pr82989() {
  456. runTest("Compiler error due to a wrong exception check in try blocks");
  457. }
  458. public void testAnonymousInnerClassWithMethodReturningTypeParameter_pr107898() {
  459. runTest("anonymous inner class with method returning type parameter");
  460. }
  461. public void testMatchingOfObjectArray() {
  462. runTest("matching against Object[]");
  463. }
  464. public void testMultipleAnonymousInnerClasses_pr108104() {
  465. runTest("multiple anonymous inner classes 2");
  466. }
  467. public void testSignatureMatchingInMultipleOverrideScenario() {
  468. runTest("signature matching in override scenario");
  469. }
  470. public void testWildcardAnnotationMatching_pr108245() {
  471. runTest("wildcard annotation matching - pr108245");
  472. }
  473. public void testInnerTypesAndTypeVariables() {
  474. runTest("inner types and type variables");
  475. }
  476. public void testAtAfterThrowingWithNoFormal() {
  477. runTest("@AfterThrowing with no formal specified");
  478. }
  479. public void testParameterizedVarArgsMatch() {
  480. runTest("varargs with type variable");
  481. }
  482. public void testFieldAccessInsideITDM() {
  483. runTest("itd field access inside itd method");
  484. }
  485. public void testTypeVarWithTypeVarBound() {
  486. runTest("type variable with type variable bound");
  487. }
  488. public void testEnumSwitchInITD() {
  489. runTest("switch on enum inside ITD method");
  490. }
  491. public void testInnerTypeOfGeneric() {
  492. runTest("inner type of generic interface reference from parameterized type");
  493. }
  494. public void testDeclareParentsIntroducingCovariantReturnType() {
  495. runTest("declare parents introducing override with covariance");
  496. }
  497. public void testInnerClassPassedToVarargs() {
  498. runTest("inner class passed as argument to varargs method");
  499. }
  500. public void testInlinedFieldAccessInProceedCall() {
  501. runTest("inlined field access in proceed call");
  502. }
  503. public void testVisibiltyInSignatureMatchingWithOverridesPart1() {
  504. runTest("visibility in signature matching with overrides - 1");
  505. }
  506. public void testVisibiltyInSignatureMatchingWithOverridesPart2() {
  507. runTest("visibility in signature matching with overrides - 2");
  508. }
  509. public void testVisibiltyInSignatureMatchingWithOverridesPart3() {
  510. runTest("visibility in signature matching with overrides - 3");
  511. }
  512. public void testArgsGeneratedCorrectlyForAdviceExecution() {
  513. runTest("args generated correctly for advice execution join point");
  514. }
  515. public void testNoUnusedWarningsOnAspectTypes() {
  516. runTest("no unused warnings on aspect types");
  517. }
  518. public void testSyntheticArgumentsOnITDConstructorsNotUsedInMatching() {
  519. runTest("synthetic arguments on itd cons are not used in matching");
  520. }
  521. public void testParsingOfGenericTypeSignature() {
  522. runTest("parse generic type signature with parameterized type in interface");
  523. }
  524. public void testOverrideAndCovarianceWithDecPRuntime() {
  525. runTest("override and covariance with decp - runtime");
  526. }
  527. public void testOverrideAndCovarianceWithDecPRuntimeMultiFiles() {
  528. runTest("override and covariance with decp - runtime separate files");
  529. }
  530. public void testOverrideAndCovarianceWithDecPRuntimeMultiFilesBinaryWeaving() {
  531. runTest("override and covariance with decp - binary weaving");
  532. }
  533. public void testAbstractSynchronizedITDMethods() {
  534. runTest("abstract synchronized itdms not detected");
  535. }
  536. public void testSynchronizedITDInterfaceMethods() {
  537. runTest("synchronized itd interface methods");
  538. }
  539. public void testNoWarningOnUnusedPointcut() {
  540. runTest("unused private pointcuts");
  541. }
  542. public void testITDOnInterfaceWithExistingMember() {
  543. runTest("itd interface method already existing on interface");
  544. }
  545. public void testFinalITDMOnInterface() {
  546. runTest("final itd methods on interfaces");
  547. }
  548. public void testPrivatePointcutOverriding() {
  549. runTest("can't override private pointcut in abstract aspect");
  550. }
  551. public void testAdviceOnCflow() {
  552. runTest("advising cflow advice execution");
  553. }
  554. public void testNoTypeMismatchOnSameGenericTypes() {
  555. runTest("no type mismatch on generic types in itds");
  556. }
  557. public void testSuperCallInITD() {
  558. runTest("super call in ITD");
  559. }
  560. public void testSuperCallInITDPart2() {
  561. runTest("super call in ITD - part 2");
  562. }
  563. public void testAtAnnotationBadTest_pr103740() {
  564. runTest("Compiler failure on at_annotation");
  565. }
  566. public void testNoUnusedParameterWarningsForSyntheticAdviceArgs() {
  567. runTest("no unused parameter warnings for synthetic advice args");
  568. }
  569. public void testNoVerifyErrorWithSetOnInnerType() {
  570. runTest("no verify error with set on inner type");
  571. }
  572. public void testCantFindTypeErrorWithGenericReturnTypeOrParameter() {
  573. runTest("cant find type error with generic return type or parameter");
  574. }
  575. public void testNoVerifyErrorOnGenericCollectionMemberAccess() {
  576. runTest("no verify error on generic collection member access");
  577. }
  578. public void testRawAndGenericTypeConversionITDCons() {
  579. runTest("raw and generic type conversion with itd cons");
  580. }
  581. public void testAtAnnotationBindingWithAround() {
  582. runTest("@annotation binding with around advice");
  583. }
  584. public void testUnableToBuildShadows_pr109728() {
  585. runTest("Unable to build shadows");
  586. }
  587. public void testMessageOnMissingTypeInDecP() {
  588. runTest("declare parents on a missing type");
  589. }
  590. public void testParameterizedGenericMethods() {
  591. runTest("parameterized generic methods");
  592. }
  593. public void testIllegalChangeToPointcutDeclaration_pr111915() {
  594. runTest("test illegal change to pointcut declaration");
  595. }
  596. public void testCantProvideDefaultImplViaITD_pr110307_1() {
  597. runTest("Cant provide default implementation via ITD - 1");
  598. }
  599. public void testCantProvideDefaultImplViaITD_pr110307_2() {
  600. runTest("Cant provide default implementation via ITD - 2");
  601. }
  602. public void testCantProvideDefaultImplViaITD_pr110307_3() {
  603. runTest("Cant provide default implementation via ITD - 3");
  604. }
  605. public void testCantProvideDefaultImplViaITD_pr110307_4() {
  606. runTest("Cant provide default implementation via ITD - 4");
  607. }
  608. public void testCantProvideDefaultImplViaITD_pr110307_5() {
  609. runTest("Cant provide default implementation via ITD - 5");
  610. }
  611. // Needs a change in the compiler so that getType() can be overridden in the intertype scope - thats
  612. // where we can police whether a type variable has been used without being specified appropriately.
  613. // public void testCantProvideDefaultImplViaITD_pr110307_6() {runTest("Cant provide default implementation via ITD - 6");}
  614. public void testCantProvideDefaultImplViaITD_pr110307_7() {
  615. runTest("Cant provide default implementation via ITD - 7");
  616. }
  617. public void testCallJoinPointsInAnonymousInnerClasses() {
  618. runTest("call join points in anonymous inner classes");
  619. }
  620. public void testNoRequirementForUnwovenTypesToBeExposedToWeaver() {
  621. runTest("default impl of Runnable");
  622. }
  623. public void testArrayCloneCallJoinPoints() {
  624. runTest("array clone call join points in 1.4 vs 1.3");
  625. }
  626. public void testDebugInfoForAroundAdvice() {
  627. runTest("debug info in around advice inlining");
  628. }
  629. public void testCCEWithGenericWildcard_pr112602() {
  630. runTest("ClassCastException with generic wildcard");
  631. }
  632. public void testVarArgsIITDInConstructor() {
  633. runTest("ITD varargs in constructor");
  634. }
  635. public void testWeaveInfoMessageForDeclareAtMethodOnITDdMethod() {
  636. runTest("weaveinfo message for declare at method on an ITDd method");
  637. }
  638. public void testITDCWithNoExplicitConsCall() {
  639. runTest("ITDC with no explicit cons call");
  640. }
  641. public void testJava5SpecificFeaturesUsedAtJava14OrLower() {
  642. runTest("java 5 pointcuts and declares at pre-java 5 compliance levels - 1.7");
  643. }
  644. public void testAnonymousTypes() {
  645. runTest("Anonymous types and nome matching");
  646. }
  647. public void testAdviceExecutionJPToStringForms() {
  648. runTest("adviceexecution join point toString forms");
  649. }
  650. public void testAssertWithinPointcutExpression() {
  651. runTest("pointcut expression containing 'assert'");
  652. }
  653. public void testNoVerifyErrorWithTwoThisPCDs_pr113447() {
  654. runTest("no verify error with two this pcds");
  655. }
  656. public void testNoVerifyErrorWithTwoAtThisPCDs_pr113447() {
  657. runTest("no verify error with two at this pcds");
  658. }
  659. public void testNoVerifyErrorWithAtWithinPCDs_pr113447() {
  660. runTest("no verify error with at within pcds");
  661. }
  662. public void testNoVerifyErrorWithAtWithincodePCDs_pr113447() {
  663. runTest("no verify error with at withincode pcds");
  664. }
  665. public void testNoVerifyErrorWithAtAnnotationPCDs_pr113447() {
  666. runTest("no verify error with at annotation pcds");
  667. }
  668. public void testNoVerifyErrorWithTwoArgsPCDs_pr113447() {
  669. runTest("no verify error with two args pcds");
  670. }
  671. public void testNoStackOverflowWithCircularPCDInGenericAspect() {
  672. runTest("no StackOverflowError with circular pcd in generic aspect");
  673. }
  674. public void testNoStackOverflowWithCircularPCDInGenericAspect2() {
  675. runTest("no StackOverflowError with circular pcd in generic aspect - 2");
  676. }
  677. public void testNPEInThisJoinPointStaticPart() {
  678. runTest("thisJoinPointStaticPart in if test");
  679. }
  680. public void testPointcutParsingOfCompiledPointcuts() {
  681. runTest("pointcut parsing with ajc compiled pointcut references");
  682. }
  683. public void testReflectionOfAbstractITDs() {
  684. runTest("reflection on abstract ITDs (Billing example)");
  685. }
  686. public void testDeclareSoftWithAdviceExecution() {
  687. runTest("declare soft and adviceexecution");
  688. }
  689. public void testDeclareSoftWithExclusions() {
  690. runTest("declare soft and exclusions");
  691. }
  692. public void testReturningObjectBinding() {
  693. runTest("returning(Object) binding");
  694. }
  695. public void testPerTargetAndNegation() {
  696. runTest("pertarget and negated pointcut");
  697. }
  698. public void testParameterizedPointcutAndAdvice() {
  699. runTest("parameterized pointcut and advice");
  700. }
  701. public void testDoublyParameterizedAbstractType() {
  702. runTest("double parameter generic abstract type");
  703. }
  704. public void testArgNamesInAdviceAnnotations() {
  705. runTest("arg names in advice annotations");
  706. }
  707. /*
  708. * Load-time weaving bugs
  709. */
  710. public void testNPEinWeavingAdaptor_pr116626() {
  711. runTest("NPE in WeavingAdaptor");
  712. }
  713. public void testXlintMessageForImproperAnnotationType_pr115252_Exact() {
  714. runTest("xlint message for improper exact annotation type");
  715. }
  716. public void testXlintMessageForImproperAnnotationType_pr115252_OR() {
  717. runTest("xlint message for improper annotation type inside OR");
  718. }
  719. public void testXlintMessageForImproperAnnotationType_pr115252_AND() {
  720. runTest("xlint message for improper annotation type inside AND");
  721. }
  722. public void testXlintMessageForImproperAnnotationType_pr115252_Return() {
  723. runTest("xlint message for improper annotated return type");
  724. }
  725. public void testXlintMessageForImproperAnnotationType_pr115252_Declaring() {
  726. runTest("xlint message for improper annotated declaring type");
  727. }
  728. public void testXlintMessageForImproperAnnotationType_pr115252_Parameter() {
  729. runTest("xlint message for improper annotated parameter type");
  730. }
  731. public void testXlintMessageForImproperAnnotationType_pr115252_Throws() {
  732. runTest("xlint message for improper annotated throws pattern");
  733. }
  734. public void testXlintMessageForImproperAnnotationType_pr115252_MoreThanOne() {
  735. runTest("xlint message for more than one improper annotated parameter type");
  736. }
  737. public void testNoNPEWhenInaccessibleMethodIsCalledWithinITD_pr119019() {
  738. runTest("no NPE when inaccessible method is called within itd");
  739. }
  740. public void testNoNPEWithOrPointcutAndMoreThanOneArgs_pr118149() {
  741. runTest("no NPE with or pointcut and more than one args");
  742. }
  743. public void testNoSOBWithGenericInnerAspects_pr119543() {
  744. runTest("no StringOutOfBoundsException with generic inner aspects");
  745. }
  746. public void testIllegalAccessErrorWithAroundAdvice_pr119657() {
  747. runTest("IllegalAccessError with around advice on interface method call");
  748. }
  749. public void testIllegalAccessErrorWithAroundAdviceNotSelf_pr119657() {
  750. runTest("IllegalAccessError with around advice on interface method call not self");
  751. }
  752. public void testIllegalAccessErrorWithAroundAdviceTerminateAfterCompilationLTW_pr119657() {
  753. runTest("IllegalAccessError with around advice on interface method call using -XterminateAfterCompilation and LTW");
  754. }
  755. public void testIllegalAccessErrorWithAroundAdviceLTW_pr119657() {
  756. runTest("IllegalAccessError with around advice on interface method call using LTW");
  757. }
  758. public void testIllegalAccessErrorWithAroundAdviceNotSelfLTW_pr119657() {
  759. runTest("IllegalAccessError with around advice on interface method call not self using LTW");
  760. }
  761. public void testIllegalAccessErrorWithAroundAdviceSelfAndNotSelfLTW_pr119657() {
  762. runTest("IllegalAccessError with around advice on interface method call self and not self using LTW");
  763. }
  764. public void testIllegalAccessErrorWithAroundAdviceLTWNoInline_pr119657() {
  765. runTest("IllegalAccessError with around advice on interface method call using LTW and -XnoInline");
  766. }
  767. public void testReflectOnCodeStyleITDs() {
  768. runTest("reflection on itds");
  769. }
  770. public void testReflectOnAtAspectJDecP() {
  771. runTest("reflection on @DeclareParents");
  772. }
  773. public void testModifierOverrides() {
  774. runTest("modifier overrides");
  775. }
  776. public void testAbstractPerThisInAtAspectJ() {
  777. runTest("abstract perthis in @AspectJ");
  778. }
  779. public void testNPEInBcelAdviceWithConcreteAspect_pr121385() {
  780. runTest("override protected pointcut in aop.xml concrete aspect");
  781. }
  782. }