123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220 |
- <!DOCTYPE suite SYSTEM "../tests/ajcTestSuite.dtd"[]>
-
- <suite>
-
-
- <ajc-test dir="bugs190/paramannos" title="param annos negative">
- <compile files="Code.java" options="-1.9 -showWeaveInfo">
- <message kind="weave" text="Join point 'constructor-execution(void Code.<init>(java.lang.Object))' in Type 'Code' (Code.java:8) advised by before advice from 'X' (Code.java:12)"/>
- </compile>
- </ajc-test>
-
-
- <ajc-test dir="bugs190/modules/aaa" title="build a module">
- <compile files="module-info.java com/foo1/C1.java" options="-1.9"/>
- </ajc-test>
-
- <ajc-test dir="bugs190/modules/bbb" title="run a module - classpath">
- <compile files="module-info.java aaa/bbb/A.java" options="-1.9"/>
- <run class="aaa.bbb.A">
- <stdout>
- <line text="A running"/>
- </stdout>
- </run>
- </ajc-test>
-
- <ajc-test dir="bugs190/modules/bbb" title="run a module - modulepath">
- <compile files="module-info.java aaa/bbb/A.java" options="-1.9"/>
- <run modulepath="$sandbox" module="my.module/aaa.bbb.A">
- <stdout>
- <line text="A running"/>
- </stdout>
- </run>
- </ajc-test>
-
- <ajc-test dir="bugs190/modules/bbb" title="package and run a module - modulepath">
- <compile files="module-info.java aaa/bbb/A.java" options="-1.9" outjar="my.module.jar"/>
- <file deletefile="module-info.java"/>
- <file deletefile="aaa"/>
- <run modulepath="my.module.jar" module="my.module/aaa.bbb.A">
- <stdout>
- <line text="A running"/>
- </stdout>
- </run>
- </ajc-test>
-
- <ajc-test dir="bugs190/modules/ccc" title="compile regular code using module code">
- <compile files="module-info.java aaa/bbb/A.java" options="-1.9" outjar="modules/my.module.jar"/>
- <file deletefile="module-info.java"/>
- <file deletefile="aaa"/>
- <compile files="InvokeA.java" options="-1.9" modulepath="$sandbox/modules/my.module.jar"/>
- </ajc-test>
-
- <ajc-test dir="bugs190/modules/ddd" title="compile regular code using module code that isn't visible">
- <compile files="module-info.java aaa/bbb/A.java" options="-1.9" outjar="modules/my.module.jar"/>
- <compile files="InvokeA.java" options="-1.9" modulepath="$sandbox/modules/my.module.jar">
- <message kind="error" text="package aaa.bbb is not visible"/>
- </compile>
- </ajc-test>
-
-
- <ajc-test dir="bugs190/modules/eee" title="binary weaving module">
- <compile files="module-info.java aaa/bbb/A.java" options="-1.9" outjar="my.module.jar"/>
- <file deletefile="module-info.java"/>
- <file deletefile="aaa"/>
- <compile files="Azpect.java" inpath="my.module.jar" outjar="my.module.woven.jar"/>
- <run modulepath="my.module.woven.jar" module="my.module/aaa.bbb.A">
- <stdout>
- <line text="Azpect running"/>
- <line text="A running"/>
- </stdout>
- </run>
- </ajc-test>
-
-
- <ajc-test dir="bugs190/520135" title="funny signature with method reference">
- <compile files="FailsApectJ.java" options="-1.8"/>
- </ajc-test>
-
- <ajc-test dir="bugs190/modules/fff" title="compile module including aspects">
- <compile files="module-info.java pkg/Demo.java otherpkg/Azpect.java" modulepath="$runtimemodule" outjar="demomodule.jar" options="-1.9"/>
- <run modulepath="$runtimemodule,demomodule.jar" module="demo/pkg.Demo">
- <stdout>
- <line text="Azpect running"/>
- <line text="Demo running"/>
- </stdout>
- </run>
- </ajc-test>
-
- <ajc-test dir="bugs190/modules/eee" title="compile module and apply aspects via aspectpath">
- <compile files="module-info.java aaa/bbb/A.java" options="-1.9" outjar="my.module.jar"/>
- <file deletefile="module-info.java"/>
- <file deletefile="aaa"/>
- <compile files="Azpect.java" outjar="azpects.jar" options="-1.4"/>
- <compile options="-showWeaveInfo" inpath="my.module.jar" aspectpath="azpects.jar" outjar="my.module.woven.jar">
- <message kind="weave" text="Join point 'method-execution(void aaa.bbb.A.main(java.lang.String[]))' in Type 'aaa.bbb.A' (A.java:4) advised by before advice from 'aspects.Azpect' (azpects.jar!Azpect.class:4(from Azpect.java))"/>
- </compile>
- <file deletefile="my.module.jar"/>
- <run classpath="my.module.woven.jar,azpects.jar" class="aaa.bbb.A">
- <stdout>
- <line text="Azpect running"/>
- <line text="A running"/>
- </stdout>
- </run>
- </ajc-test>
-
- <ajc-test dir="bugs190/modules/ggg" title="module path vs classpath 1">
- <!-- build some simple code into a jar we can depend on *not a module* -->
- <compile files="ddd/D.java" options="-1.9" outjar="foo.jar"/>
- <file deletefile="ddd/D.java"/>
- <!-- compile a module that depends on that -->
- <!-- this fails because if you start working with modules you commit to the modules story and classpath
- becomes irrelevant -->
- <compile files="module-info.java aaa/bbb/A.java" options="-1.9" outjar="module.jar" classpath="foo.jar">
- <message kind="error" text="The type ddd.D is not accessible"/>
- <message kind="error" text="D cannot be resolved"/>
- <!--
- <message kind="error" text="The import ddd cannot be resolved"/>
- <message kind="error" text="package ddd is not visible"/>
- -->
- </compile>
- </ajc-test>
-
- <ajc-test dir="bugs190/modules/hhh" title="module path vs classpath 2">
- <!-- build some simple code into a jar we can depend on *not a module* -->
- <file renamefrom="module-info-a.java" renameto="module-info.java"/>
- <compile files="module-info.java ddd/D.java" options="-1.9" outjar="my.module.a.jar"/>
- <!--
- <file renamefrom="module-info-b.java" renameto="module-info.java"/>
- <compile files="module-info.java aaa/bbb/A.java" options="-1.9" outjar="my.module.b.jar" modulepath="my.module.a.jar"/>
- -->
- </ajc-test>
-
- <ajc-test dir="bugs190/modules/iii" title="compile use of java.xml.bind">
- <compile files="UsesJAXB.java" options="--add-modules java.xml.bind -1.9"/>
- <run class="UsesJAXB" vmargs="--add-modules java.xml.bind">
- <stdout>
- <line text="UsesJAXB.running..."/>
- </stdout>
- </run>
- </ajc-test>
-
- <ajc-test dir="bugs190/modules/iii" title="weave use of java.xml.bind">
- <compile files="UsesJAXB.java Azpect.java" options="--add-modules java.xml.bind -1.9"/>
- <run class="UsesJAXB" vmargs="--add-modules java.xml.bind">
- <stdout>
- <line text="UsesJAXB.running..."/>
- <line text="null"/>
- </stdout>
- </run>
- </ajc-test>
-
- <ajc-test dir="bugs190/modules/iii" title="limit modules 1">
- <compile files="UsesJAXB.java Azpect.java" options="--limit-modules java.xml.bind -1.9"/>
- <run class="UsesJAXB" vmargs="--limit-modules java.xml.bind">
- <stdout>
- <line text="UsesJAXB.running..."/>
- <line text="null"/>
- </stdout>
- </run>
- </ajc-test>
-
- <ajc-test dir="bugs190/modules/iii" title="add reads 1">
- <compile files="UsesJAXB.java Azpect.java" options="--add-reads java.sql=java.xml.bind --add-modules java.sql -1.9"/>
- <run class="UsesJAXB" vmargs="--add-modules java.xml.bind ">
- <stdout>
- <line text="UsesJAXB.running..."/>
- <line text="null"/>
- </stdout>
- </run>
- </ajc-test>
-
- <!--
- <compile files="module-info.java aaa/bbb/A.java" options="-1.9" outjar="module.jar" aspectpath="foo.jar"/>
- <compile files="module-info.java aaa/bbb/A.java" options="-1.9" outjar="my.module.jar"/>
- <file deletefile="module-info.java"/>
- <file deletefile="aaa"/>
- <compile files="Azpect.java" outjar="azpects.jar"/>
- <compile options="-showWeaveInfo" inpath="my.module.jar" aspectpath="azpects.jar" outjar="my.module.woven.jar">
- <message kind="weave" text="Join point 'method-execution(void aaa.bbb.A.main(java.lang.String[]))' in Type 'aaa.bbb.A' (A.java:4) advised by before advice from 'aspects.Azpect' (azpects.jar!Azpect.class:4(from Azpect.java))"/>
- </compile>
- <file deletefile="my.module.jar"/>
- <run classpath="my.module.woven.jar,azpects.jar" class="aaa.bbb.A">
- <stdout>
- <line text="Azpect running"/>
- <line text="A running"/>
- </stdout>
- </run>
- </ajc-test>
- -->
-
- <ajc-test dir="bugs190/modules" title="weave module">
- <compile files="aspect1/Azpect1.java" inpath="module1/module-one.jar" outjar="runner.jar" options="-1.8"/>
- <run classpath="runner.jar" class="a.b.c.Code"/>
- </ajc-test>
-
- <ajc-test dir="bugs190/various" title="setting static final outside clinit">
- <compile files="Code.java" options="-1.9"/>
- <run class="Code">
- <stdout>
- <line text="call(void java.io.PrintStream.println(String))"/>
- <line text="running"/>
- </stdout>
- </run>
- </ajc-test>
-
- <!-- from ajc153 -->
- <ajc-test dir="bugs153/pr156962" title="Test Annot Method Has Member 1">
- <compile files="Sample.java, LiftDeprecation.aj" options="-1.9 -XhasMember -showWeaveInfo -Xlint:ignore">
- <message kind="weave" text="'Sample' (Sample.java:1) is annotated with @Deprecated type annotation from 'LiftDeprecation' (LiftDeprecation.aj:2)"/>
- </compile>
- </ajc-test>
-
- <!-- from ajc153 -->
- <ajc-test dir="bugs153/pr156962" title="Test Annot Method Has Member 2">
- <compile files="Sample.java, LiftDeprecation.aj" options="-1.8 -XhasMember -showWeaveInfo -Xlint:ignore">
- <message kind="weave" text="'Sample' (Sample.java:1) is annotated with @Deprecated type annotation from 'LiftDeprecation' (LiftDeprecation.aj:2)"/>
- </compile>
- </ajc-test>
-
- </suite>
|