Lines 1-6
Link Here
|
1 |
|
1 |
|
2 |
<!-- Load-time weaving tests --> |
2 |
<!-- Load-time weaving tests --> |
3 |
|
|
|
4 |
<ajc-test dir="ltw" |
3 |
<ajc-test dir="ltw" |
5 |
title="Ensure 1st aspect is rewoven when weaving 2nd aspect" |
4 |
title="Ensure 1st aspect is rewoven when weaving 2nd aspect" |
6 |
keywords="reweavable"> |
5 |
keywords="reweavable"> |
Lines 339-342
Link Here
|
339 |
</stderr> |
338 |
</stderr> |
340 |
</run> |
339 |
</run> |
341 |
</ajc-test> |
340 |
</ajc-test> |
342 |
|
341 |
|
|
|
342 |
<!-- based on "Ensure 1st aspect is rewoven when weaving 2nd aspect" --> |
343 |
<ajc-test dir="ltw" |
344 |
title="Nonstandard jar file extensions" pr="137235"> |
345 |
<compile |
346 |
files="folder.jar/Main.java, folder.jar/Aspect1.aj" |
347 |
outjar="folder.jar/main1.zip" |
348 |
options="-showWeaveInfo" |
349 |
> |
350 |
<message kind="weave" text="method-execution(void Main.test1())' in Type 'Main' (Main.java:17) advised by before advice from 'Aspect1' (Aspect1.aj:16)"/> |
351 |
</compile> |
352 |
<compile |
353 |
classpath="$sandbox/folder.jar/main1.zip" |
354 |
files="Aspect2.aj" |
355 |
outjar="aspect2Jar" |
356 |
options="-showWeaveInfo" |
357 |
> |
358 |
</compile> |
359 |
<run class="Main" ltw="aop-ltwreweavable.xml" classpath="$sandbox/folder.jar/main1.zip,$sandbox/aspect2Jar"> |
360 |
<stdout> |
361 |
<line text="Main.main"/> |
362 |
<line text="Main.test1"/> |
363 |
<line text="Main.test2"/> |
364 |
</stdout> |
365 |
<stderr> |
366 |
<line text="weaveinfo Join point 'method-execution(void Main.test1())' in Type 'Main' (Main.java:17) advised by before advice from 'Aspect1' (Aspect1.aj:16)"/> |
367 |
<line text="weaveinfo Join point 'method-execution(void Main.test2())' in Type 'Main' (Main.java:21) advised by before advice from 'Aspect2' (Aspect2.aj:16)"/> |
368 |
<line text="Aspect1.before_test1"/> |
369 |
<line text="Aspect2.before_test2"/> |
370 |
</stderr> |
371 |
</run> |
372 |
</ajc-test> |
373 |
|
374 |
<ajc-test dir="ltw" |
375 |
title="Odd zip on classpath" pr="137235"> |
376 |
<compile |
377 |
files="folder.jar/Main.java, folder.jar/Aspect1.aj" |
378 |
outjar="folder.jar/main1.archive" |
379 |
options="-showWeaveInfo" |
380 |
> |
381 |
<message kind="weave" text="method-execution(void Main.test1())' in Type 'Main' (Main.java:17) advised by before advice from 'Aspect1' (Aspect1.aj:16)"/> |
382 |
</compile> |
383 |
<compile |
384 |
classpath="$sandbox/folder.jar/main1.archive" |
385 |
files="Aspect2.aj" |
386 |
outjar="aspect2Jar" |
387 |
options="-showWeaveInfo" |
388 |
> |
389 |
</compile> |
390 |
<run class="Main" ltw="aop-ltwreweavable.xml" classpath="$sandbox/folder.jar/main1.archive,$sandbox/aspect2Jar"> |
391 |
<stdout> |
392 |
<line text="Main.main"/> |
393 |
<line text="Main.test1"/> |
394 |
<line text="Main.test2"/> |
395 |
</stdout> |
396 |
<stderr> |
397 |
<line text="weaveinfo Join point 'method-execution(void Main.test1())' in Type 'Main' (Main.java:17) advised by before advice from 'Aspect1' (Aspect1.aj:16)"/> |
398 |
<line text="weaveinfo Join point 'method-execution(void Main.test2())' in Type 'Main' (Main.java:21) advised by before advice from 'Aspect2' (Aspect2.aj:16)"/> |
399 |
<line text="Aspect1.before_test1"/> |
400 |
<line text="Aspect2.before_test2"/> |
401 |
</stderr> |
402 |
</run> |
403 |
</ajc-test> |
404 |
|
405 |
<!-- |
406 |
commented out: reported in another bugzilla bug... |
407 |
|
408 |
<ajc-test dir="ltw/hier" |
409 |
title="Separate compilation with ltw: declare parents and call" |
410 |
keywords="ltw"> |
411 |
<compile |
412 |
files="util/A.aj,util/T.aj" |
413 |
/> |
414 |
<compile |
415 |
files="child/Executor.aj,child/Advisor.aj,top/SimpleMain.aj" |
416 |
> |
417 |
<message kind="warning" text="this affected type is not exposed to the weaver: util.A"/> |
418 |
</compile> |
419 |
<run class="top.SimpleMain" ltw="aop-single.xml"> |
420 |
<stdout> |
421 |
<line text="T call"/> |
422 |
</stdout> |
423 |
<stderr> |
424 |
<line text="weaveinfo Extending interface set for type 'util.A' (A.aj) to include 'util.T' (Advisor.aj)"/> |
425 |
< - - TODO: fix up any errors in the expected output when the join point actually matches - - > |
426 |
<line text="weaveinfo Join point 'method-call(void A.foo())' in Type 'child.Executor' (Executor.aj:19) advised by before advice from 'child.Advisor' (Advisor.aj:20)"/> |
427 |
</stderr> |
428 |
</run> |
429 |
</ajc-test> |
430 |
|
431 |
<ajc-test dir="ltw/hier" |
432 |
title="Child loader aspect won't weave parent loader: declare parents and call" |
433 |
keywords="ltw"> |
434 |
<compile |
435 |
files="top/HierMain.aj" |
436 |
/> |
437 |
<compile |
438 |
files="util/A.aj,util/T.aj" |
439 |
outjar="util.jar" |
440 |
/> |
441 |
<compile |
442 |
files="child/Executor.aj,child/Advisor.aj" |
443 |
classpath="util.jar" |
444 |
options="-outxml" |
445 |
outjar="child.zip" |
446 |
> |
447 |
<message kind="warning" text="this affected type is not exposed to the weaver: util.A"/> |
448 |
</compile> |
449 |
< - - limitation: to turn on load-time weaving we HAVE to have a top-level aop.xml file |
450 |
since we don't want any top-level aspects, we deploy an empty one! |
451 |
the important aop.xml file in this test was created with -outxml and lives in child.jar - - > |
452 |
<run class="top.HierMain" ltw="null-aop.xml"> |
453 |
<stdout/> |
454 |
<stderr> |
455 |
<line text="info AspectJ Weaver Version"/> |
456 |
<line text="info register classloader"/> |
457 |
<line text="info using"/> |
458 |
<line text="info weaving 'top.HierMain'"/> |
459 |
<line text="info AspectJ Weaver Version"/> |
460 |
<line text="info register classloader"/> |
461 |
<line text="info using"/> |
462 |
<line text="info using file:"/> |
463 |
<line text="info register aspect child.Advisor"/> |
464 |
<line text="info weaving 'child.Executor'"/> |
465 |
<line text="info weaving 'util.A'"/> |
466 |
</stderr> |
467 |
</run> |
468 |
</ajc-test> |
469 |
--> |
470 |
|