diff options
author | wisberg <wisberg> | 2003-05-02 19:09:11 +0000 |
---|---|---|
committer | wisberg <wisberg> | 2003-05-02 19:09:11 +0000 |
commit | d65c2ae14065d41e0d6e5d0c29cede9514299183 (patch) | |
tree | 086a1d05d8980915f7939572b3241cc586f57603 /tests/incremental | |
parent | 7fd85a690bf8d63cc96725a0185916b1672d043f (diff) | |
download | aspectj-d65c2ae14065d41e0d6e5d0c29cede9514299183.tar.gz aspectj-d65c2ae14065d41e0d6e5d0c29cede9514299183.zip |
passing incremental tests from testing-drivers/testdata/harness/incremental
Diffstat (limited to 'tests/incremental')
33 files changed, 616 insertions, 0 deletions
diff --git a/tests/incremental/initialTests/TestNoTester.java b/tests/incremental/initialTests/TestNoTester.java new file mode 100644 index 000000000..c411c1514 --- /dev/null +++ b/tests/incremental/initialTests/TestNoTester.java @@ -0,0 +1,5 @@ + +public class TestNoTester { + public static void main (String[] args) { + } +} diff --git a/tests/incremental/initialTests/classAdded/main/Main.20.java b/tests/incremental/initialTests/classAdded/main/Main.20.java new file mode 100644 index 000000000..aae295f7f --- /dev/null +++ b/tests/incremental/initialTests/classAdded/main/Main.20.java @@ -0,0 +1,11 @@ +package main; + +public class Main { + public static void main (String[] args) { + new Target().run(); + } +} + +class Target { + void run() {} +} diff --git a/tests/incremental/initialTests/classAdded/main/Main.java b/tests/incremental/initialTests/classAdded/main/Main.java new file mode 100644 index 000000000..185ed42bf --- /dev/null +++ b/tests/incremental/initialTests/classAdded/main/Main.java @@ -0,0 +1,7 @@ + +package main; + +public class Main { + public static void main (String[] args) { + } +} diff --git a/tests/incremental/initialTests/classRemoved/main/Main.20.java b/tests/incremental/initialTests/classRemoved/main/Main.20.java new file mode 100644 index 000000000..dbe5d38ca --- /dev/null +++ b/tests/incremental/initialTests/classRemoved/main/Main.20.java @@ -0,0 +1,8 @@ + +package main; + +public class Main { + public static void main (String[] args) { + } +} + diff --git a/tests/incremental/initialTests/classRemoved/main/Main.java b/tests/incremental/initialTests/classRemoved/main/Main.java new file mode 100644 index 000000000..aae295f7f --- /dev/null +++ b/tests/incremental/initialTests/classRemoved/main/Main.java @@ -0,0 +1,11 @@ +package main; + +public class Main { + public static void main (String[] args) { + new Target().run(); + } +} + +class Target { + void run() {} +} diff --git a/tests/incremental/initialTests/classUnchanged/main/Main.20.java b/tests/incremental/initialTests/classUnchanged/main/Main.20.java new file mode 100644 index 000000000..fba791e7a --- /dev/null +++ b/tests/incremental/initialTests/classUnchanged/main/Main.20.java @@ -0,0 +1,12 @@ + +package main; + +public class Main { + public static void main (String[] args) { + String s = "" + new Target(); + } +} + +class Target { + void run() {} +} diff --git a/tests/incremental/initialTests/classUnchanged/main/Main.java b/tests/incremental/initialTests/classUnchanged/main/Main.java new file mode 100644 index 000000000..aae295f7f --- /dev/null +++ b/tests/incremental/initialTests/classUnchanged/main/Main.java @@ -0,0 +1,11 @@ +package main; + +public class Main { + public static void main (String[] args) { + new Target().run(); + } +} + +class Target { + void run() {} +} diff --git a/tests/incremental/initialTests/classUpdated/main/Main.20.java b/tests/incremental/initialTests/classUpdated/main/Main.20.java new file mode 100644 index 000000000..d0b9d37b4 --- /dev/null +++ b/tests/incremental/initialTests/classUpdated/main/Main.20.java @@ -0,0 +1,8 @@ +package main; + +public class Main { + public static void main (String[] args) { + new Main().run(); + } + void run() {} +} diff --git a/tests/incremental/initialTests/classUpdated/main/Main.java b/tests/incremental/initialTests/classUpdated/main/Main.java new file mode 100644 index 000000000..185ed42bf --- /dev/null +++ b/tests/incremental/initialTests/classUpdated/main/Main.java @@ -0,0 +1,7 @@ + +package main; + +public class Main { + public static void main (String[] args) { + } +} diff --git a/tests/incremental/initialTests/defaultPackage-list/Main.30.java b/tests/incremental/initialTests/defaultPackage-list/Main.30.java new file mode 100644 index 000000000..a46687d78 --- /dev/null +++ b/tests/incremental/initialTests/defaultPackage-list/Main.30.java @@ -0,0 +1,8 @@ + +// default package + +public class Main { + public static void main (String[] args) { + new Target().run(); + } +} diff --git a/tests/incremental/initialTests/defaultPackage-list/Main.50.java b/tests/incremental/initialTests/defaultPackage-list/Main.50.java new file mode 100644 index 000000000..7616df98c --- /dev/null +++ b/tests/incremental/initialTests/defaultPackage-list/Main.50.java @@ -0,0 +1,7 @@ + +// default package + +public class Main { + public static void main (String[] args) { + } +} diff --git a/tests/incremental/initialTests/defaultPackage-list/Main.java b/tests/incremental/initialTests/defaultPackage-list/Main.java new file mode 100644 index 000000000..66b7433e4 --- /dev/null +++ b/tests/incremental/initialTests/defaultPackage-list/Main.java @@ -0,0 +1,7 @@ + +// default package + +public class Main { + public static void main (String[] args) { + } +} diff --git a/tests/incremental/initialTests/defaultPackage-list/Target.delete.40.java b/tests/incremental/initialTests/defaultPackage-list/Target.delete.40.java new file mode 100644 index 000000000..187c8a8e6 --- /dev/null +++ b/tests/incremental/initialTests/defaultPackage-list/Target.delete.40.java @@ -0,0 +1,2 @@ + +// delete this file
\ No newline at end of file diff --git a/tests/incremental/initialTests/defaultPackage-list/Target.java b/tests/incremental/initialTests/defaultPackage-list/Target.java new file mode 100644 index 000000000..d67b06569 --- /dev/null +++ b/tests/incremental/initialTests/defaultPackage-list/Target.java @@ -0,0 +1,9 @@ + +// default package + +public class Target { + public static void main(String[] args) { + new Target().run(); + } + void run() {} +} diff --git a/tests/incremental/initialTests/defaultPackage/Main.30.java b/tests/incremental/initialTests/defaultPackage/Main.30.java new file mode 100644 index 000000000..a46687d78 --- /dev/null +++ b/tests/incremental/initialTests/defaultPackage/Main.30.java @@ -0,0 +1,8 @@ + +// default package + +public class Main { + public static void main (String[] args) { + new Target().run(); + } +} diff --git a/tests/incremental/initialTests/defaultPackage/Main.50.java b/tests/incremental/initialTests/defaultPackage/Main.50.java new file mode 100644 index 000000000..7616df98c --- /dev/null +++ b/tests/incremental/initialTests/defaultPackage/Main.50.java @@ -0,0 +1,7 @@ + +// default package + +public class Main { + public static void main (String[] args) { + } +} diff --git a/tests/incremental/initialTests/defaultPackage/Main.java b/tests/incremental/initialTests/defaultPackage/Main.java new file mode 100644 index 000000000..66b7433e4 --- /dev/null +++ b/tests/incremental/initialTests/defaultPackage/Main.java @@ -0,0 +1,7 @@ + +// default package + +public class Main { + public static void main (String[] args) { + } +} diff --git a/tests/incremental/initialTests/defaultPackage/Target.20.java b/tests/incremental/initialTests/defaultPackage/Target.20.java new file mode 100644 index 000000000..d67b06569 --- /dev/null +++ b/tests/incremental/initialTests/defaultPackage/Target.20.java @@ -0,0 +1,9 @@ + +// default package + +public class Target { + public static void main(String[] args) { + new Target().run(); + } + void run() {} +} diff --git a/tests/incremental/initialTests/defaultPackage/Target.delete.40.java b/tests/incremental/initialTests/defaultPackage/Target.delete.40.java new file mode 100644 index 000000000..187c8a8e6 --- /dev/null +++ b/tests/incremental/initialTests/defaultPackage/Target.delete.40.java @@ -0,0 +1,2 @@ + +// delete this file
\ No newline at end of file diff --git a/tests/incremental/initialTests/expClasses/Main.java b/tests/incremental/initialTests/expClasses/Main.java new file mode 100644 index 000000000..66b7433e4 --- /dev/null +++ b/tests/incremental/initialTests/expClasses/Main.java @@ -0,0 +1,7 @@ + +// default package + +public class Main { + public static void main (String[] args) { + } +} diff --git a/tests/incremental/initialTests/expClasses/expected/Main.class b/tests/incremental/initialTests/expClasses/expected/Main.class Binary files differnew file mode 100644 index 000000000..fba840b69 --- /dev/null +++ b/tests/incremental/initialTests/expClasses/expected/Main.class diff --git a/tests/incremental/initialTests/readme.txt b/tests/incremental/initialTests/readme.txt new file mode 100644 index 000000000..c4ef5e1d3 --- /dev/null +++ b/tests/incremental/initialTests/readme.txt @@ -0,0 +1,15 @@ + +These tests were brought over from testing-drivers. + +The test specifications are in ajcTests{Failing}.xml. + +Some files are old and unused in this directory: + +- The files suite.xml, suiteFails.xml, and selectionTest.xml + show the old test specifications. + - Note that you can run "incremental" tests without the + -incremental option, and it will work even when listing + files (rather than using sourceroots), except that + deleting listed files causes an error. + +- It's possible not all sources are used. diff --git a/tests/incremental/initialTests/selectionTest.xml b/tests/incremental/initialTests/selectionTest.xml new file mode 100644 index 000000000..1657317e8 --- /dev/null +++ b/tests/incremental/initialTests/selectionTest.xml @@ -0,0 +1,145 @@ + +<!DOCTYPE suite SYSTEM "../tests/ajcTestSuite.dtd"> + +<suite > + + <!-- ............................................................................. + Should get 1 tests run and passed when running with global options: + -ajctestRequireKeywords=requireKeyword + -ajctestSkipKeywords=skipKeyword + !verbose + -eclipse + + This is used by a JUnit test HarnessSelectionTest. + Do not change the outcome without changing that test. + --> + + <ajc-test dir="." title="run and pass" + keywords="requireKeyword" > + <compile files="TestNoTester.java"/> + <run class="TestNoTester"/> + </ajc-test> + + <!-- ............................................................................. + AjcTest should skip or select based on (arbitrary) keywords + --> + + <ajc-test dir="." pr="100" title="omit if skipKeyword" keywords="requireKeyword,skipKeyword" > + <compile staging="false" files="TestNoTester.java"/> + <run class="TestNoTester"/> + </ajc-test> + + <!-- ............................................................................. + CompilerRun should resolve soft conflicts in favor of globals. XXX + --> + + <!-- ............................................................................. + CompilerRun should skip hard conflicts (both local and global use force). XXX + --> + <ajc-test dir="." pr="101" title="skip - conflict of local ^verbose and global !verbose XXX failing - runs" + keywords="requireKeyword" > + <compile files="TestNoTester.java" options="^verbose"/> + <run class="TestNoTester"/> + </ajc-test> + + + <!-- ............................................................................. + CompilerRun should skip semantic conflicts - see CompilerRun.Spec.setupArgs(..). + --> + + <ajc-test dir="." title="skip - local conflict between -lenient, -strict" + keywords="requireKeyword" > + <compile files="TestNoTester.java" options="-lenient,-strict"/> + <run class="TestNoTester"/> + </ajc-test> + + <ajc-test dir="." title="skip - local conflict between forced lenient, forced strict" + keywords="requireKeyword" > + <compile files="TestNoTester.java" options="!lenient,!strict"/> + <run class="TestNoTester"/> + </ajc-test> + + <!-- ................... ajc limitations --> + <ajc-test dir="." title="skip - forced ajc with incremental tests" + keywords="requireKeyword" > + <compile staging="true" files="TestNoTester.java" options="!ajc"/> + <run class="TestNoTester"/> + </ajc-test> + + <!-- ................... eajc limitations --> + <ajc-test dir="." title="skip - forced eclipse with -strict" + keywords="requireKeyword,ajcEclipseForceConflict,eclipseOptionSkip" > + <compile staging="true" files="TestNoTester.java" options="-strict,!eclipse"/> + <run class="TestNoTester"/> + </ajc-test> + + <ajc-test dir="." title="skip - forced eclipse with -lenient" + keywords="requireKeyword,ajcEclipseForceConflict,eclipseOptionSkip" > + <compile staging="true" files="TestNoTester.java" options="-lenient,!eclipse"/> + <run class="TestNoTester"/> + </ajc-test> + + <ajc-test dir="." title="skip - forced eclipse with forced strict" + keywords="requireKeyword,ajcEclipseForceConflict,eclipseOptionSkip" > + <compile staging="true" files="TestNoTester.java" options="!strict,!eclipse"/> + <run class="TestNoTester"/> + </ajc-test> + + <ajc-test dir="." title="skip - forced eclipse with forced lenient" + keywords="requireKeyword,ajcEclipseForceConflict,eclipseOptionSkip" > + <compile staging="true" files="TestNoTester.java" options="!lenient,!eclipse"/> + <run class="TestNoTester"/> + </ajc-test> + + <ajc-test dir="." title="skip - forced eclipse with -preprocess" + keywords="requireKeyword,ajcEclipseForceConflict,eclipseOptionSkip" > + <compile staging="true" files="TestNoTester.java" options="-preprocess,!eclipse"/> + <run class="TestNoTester"/> + </ajc-test> + + <ajc-test dir="." title="skip - forced eclipse with -usejavac" + keywords="requireKeyword,ajcEclipseForceConflict,eclipseOptionSkip" > + <compile staging="true" files="TestNoTester.java" options="-usejavac,!eclipse"/> + <run class="TestNoTester"/> + </ajc-test> + + <!-- ............................................................................. + CompilerRun should skip invalid options CompilerRun.Spec.INVALID_OPTIONS: + { "-workingdir", "-argfile", "-sourceroot", "-outjar", "-source" } + --> + + <ajc-test dir="." title="skip - local invalid option -workingdir" + keywords="requireKeyword,localInvalidOption" > + <compile files="TestNoTester.java" options="-workingdir,."/> + <run class="TestNoTester"/> + </ajc-test> + + <ajc-test dir="." title="skip - local invalid option -argfile" + keywords="requireKeyword,localInvalidOption" > + <compile files="TestNoTester.java" options="-argfile,f"/> + <run class="TestNoTester"/> + </ajc-test> + + <ajc-test dir="." title="skip - local invalid option -sourceroot" + keywords="requireKeyword,localInvalidOption" > + <compile files="TestNoTester.java" options="-sourceroot,."/> + <run class="TestNoTester"/> + </ajc-test> + + <ajc-test dir="." title="skip - local invalid option -outjar" + keywords="requireKeyword,localInvalidOption" > + <compile files="TestNoTester.java" options="-outjar,foo.jar"/> + <run class="TestNoTester"/> + </ajc-test> + + <ajc-test dir="." title="skip - local invalid option -source 1.4" + keywords="requireKeyword,localInvalidOption" > + <compile files="TestNoTester.java" options="-source,1.4"/> + <run class="TestNoTester"/> + </ajc-test> + + <!-- ............................................................................. + CompilerRun should skip invalid options specified as globals XXX + --> + +</suite> diff --git a/tests/incremental/initialTests/sourceAdded/main/Main.30.java b/tests/incremental/initialTests/sourceAdded/main/Main.30.java new file mode 100644 index 000000000..59564d39c --- /dev/null +++ b/tests/incremental/initialTests/sourceAdded/main/Main.30.java @@ -0,0 +1,12 @@ + +package main; + +import org.aspectj.testing.Tester; + +public class Main { + public static void main (String[] args) { + new Target().run(); + Tester.expectEvent("Target.run()"); + Tester.checkAllEvents(); + } +} diff --git a/tests/incremental/initialTests/sourceAdded/main/Main.java b/tests/incremental/initialTests/sourceAdded/main/Main.java new file mode 100644 index 000000000..185ed42bf --- /dev/null +++ b/tests/incremental/initialTests/sourceAdded/main/Main.java @@ -0,0 +1,7 @@ + +package main; + +public class Main { + public static void main (String[] args) { + } +} diff --git a/tests/incremental/initialTests/sourceAdded/main/Target.20.java b/tests/incremental/initialTests/sourceAdded/main/Target.20.java new file mode 100644 index 000000000..985587eec --- /dev/null +++ b/tests/incremental/initialTests/sourceAdded/main/Target.20.java @@ -0,0 +1,9 @@ +package main; + +import org.aspectj.testing.Tester; + +public class Target { + void run() { + Tester.event("Target.run()"); + } +} diff --git a/tests/incremental/initialTests/sourceDeleted/delete/DeleteMe.delete.20.java b/tests/incremental/initialTests/sourceDeleted/delete/DeleteMe.delete.20.java new file mode 100644 index 000000000..345047b16 --- /dev/null +++ b/tests/incremental/initialTests/sourceDeleted/delete/DeleteMe.delete.20.java @@ -0,0 +1,2 @@ + +// delete file DeleteMe.java
\ No newline at end of file diff --git a/tests/incremental/initialTests/sourceDeleted/delete/DeleteMe.java b/tests/incremental/initialTests/sourceDeleted/delete/DeleteMe.java new file mode 100644 index 000000000..9057235ff --- /dev/null +++ b/tests/incremental/initialTests/sourceDeleted/delete/DeleteMe.java @@ -0,0 +1,7 @@ + +package delete; + +public class DeleteMe { + static void run() { + } +} diff --git a/tests/incremental/initialTests/sourceDeleted/delete/Main.java b/tests/incremental/initialTests/sourceDeleted/delete/Main.java new file mode 100644 index 000000000..e180e46c8 --- /dev/null +++ b/tests/incremental/initialTests/sourceDeleted/delete/Main.java @@ -0,0 +1,8 @@ + +package delete; + +public class Main { + public static void main(String[] args) { + Target.run(); + } +} diff --git a/tests/incremental/initialTests/sourceDeleted/delete/Target.30.java b/tests/incremental/initialTests/sourceDeleted/delete/Target.30.java new file mode 100644 index 000000000..1678b7055 --- /dev/null +++ b/tests/incremental/initialTests/sourceDeleted/delete/Target.30.java @@ -0,0 +1,7 @@ + +package delete; + +public class Target { + static void run() { + } +} diff --git a/tests/incremental/initialTests/sourceDeleted/delete/Target.java b/tests/incremental/initialTests/sourceDeleted/delete/Target.java new file mode 100644 index 000000000..a19401904 --- /dev/null +++ b/tests/incremental/initialTests/sourceDeleted/delete/Target.java @@ -0,0 +1,8 @@ + +package delete; + +public class Target { + static void run() { + DeleteMe.run(); // CE 6 after DeleteMe deleted + } +} diff --git a/tests/incremental/initialTests/suite.xml b/tests/incremental/initialTests/suite.xml new file mode 100644 index 000000000..b6b568384 --- /dev/null +++ b/tests/incremental/initialTests/suite.xml @@ -0,0 +1,109 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!DOCTYPE suite SYSTEM "../tests/ajcTestSuite.dtd"> + +<suite> + + <!-- driven from JUnit by HarnessSelectionTest.testIncrementalSuite() --> + <!-- + Using OldAjc (no inc-compile), get two errors (updated file not found (b/c cleared?), + deleted file not found. + --> + + <!-- + test harness ability to update and delete source files to prep for a compile + --> + <ajc-test dir="sourceDeleted" title=" file" keywords="incremental" > + <compile staging="true" files="delete/Main.java,delete/Target.java,delete/DeleteMe.java"/> + <run class="delete.Main"/> + <inc-compile tag="20"> + <dir-changes removed="delete.DeleteMe"/> + <message kind="error" line="6" file="delete/Target.java"/> + </inc-compile> + <inc-compile tag="30"/> + <run class="delete.Main"/> + </ajc-test> + + <ajc-test dir="sourceAdded" title="add file with class" keywords="incremental" > + <compile staging="true" files="main/Main.java"/> + <run class="main.Main"/> + <inc-compile tag="20"> + <dir-changes added="main.Target"/> + </inc-compile> + <inc-compile tag="30"> + <dir-changes updated="main.Main"/> + </inc-compile> + <run class="main.Main"/> + </ajc-test> + + <ajc-test dir="defaultPackage" title="do everything in default package" keywords="incremental" > + <compile staging="true" files="Main.java"/> + <run class="Main"/> + <inc-compile tag="20"> + <dir-changes added="Target"/> + </inc-compile> + <run class="Target" skipTester="true"/> + <inc-compile tag="30"> + <dir-changes updated="Main"/> + </inc-compile> + <run class="Main" skipTester="true"/> + <inc-compile tag="40"> + <dir-changes updated="Main" removed="Target"/> + <message kind="error" line="1"/> + </inc-compile> + <run class="Main"/> + </ajc-test> + + <!-- + test harness detection of .class file added, removed, or changed + as a result of the compile process. + XXX test dir-changes for JavaRun, CompilerRun + XXX document special handling of dir-changes paths as FQN for .class suffix + XXX need negative tests, fails reported + --> + <ajc-test dir="classAdded" title="expect class added" keywords="incremental" > + <compile staging="true" files="main/Main.java"/> + <run class="main.Main"/> + <inc-compile tag="20" > + <dir-changes added="main.Target"/> + </inc-compile> + <run class="main.Main" skipTester="true"/> + </ajc-test> + + <ajc-test dir="classRemoved" title="expect class removed" keywords="incremental" > + <compile staging="true" files="main/Main.java"/> + <run class="main.Main"/> + <inc-compile tag="20"> + <dir-changes removed="main.Target"/> + </inc-compile> + <run class="main.Main"/> + </ajc-test> + + <ajc-test dir="classUnchanged" title="expect class unchanged" keywords="incremental" > + <compile staging="true" files="main/Main.java"/> + <run class="main.Main"/> + <inc-compile tag="20"> + <dir-changes updated="main.Main" unchanged="main.Target"/> + </inc-compile> + <run class="main.Main"/> + </ajc-test> + + <ajc-test dir="classUpdated" title="expect class updated" keywords="incremental" > + <compile staging="true" files="main/Main.java"/> + <run class="main.Main"/> + <inc-compile tag="20"> + <dir-changes updated="main.Main"/> + </inc-compile> + <run class="main.Main"/> + </ajc-test> + + <ajc-test dir="expClasses" title="expected class tree" keywords="incremental" + comment="XXX need to install Main.class compiled with harness" > + <compile files="Main.java"> + <dir-changes expDir="expClasses"/> + </compile> + <run class="Main"/> + </ajc-test> + + +</suite> diff --git a/tests/incremental/initialTests/suiteFails.xml b/tests/incremental/initialTests/suiteFails.xml new file mode 100644 index 000000000..8bf7f7404 --- /dev/null +++ b/tests/incremental/initialTests/suiteFails.xml @@ -0,0 +1,134 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> + +<!DOCTYPE suite [ + <!ELEMENT suite (ajc-test+)> + <!ATTLIST suite suiteDir CDATA #IMPLIED > + <!ATTLIST suite verbose CDATA #IMPLIED > + + <!ELEMENT ajc-test (compile, (compile | inc-compile | run )*)> + <!ATTLIST ajc-test title CDATA #REQUIRED > + <!ATTLIST ajc-test dir CDATA #REQUIRED > + <!ATTLIST ajc-test pr CDATA #IMPLIED > + <!ATTLIST ajc-test keywords CDATA #IMPLIED > + + <!ELEMENT compile (dir-changes*,file*,message*)> + <!ATTLIST compile files CDATA #IMPLIED > + <!ATTLIST compile options CDATA #IMPLIED > + <!ATTLIST compile staging (true | false) #IMPLIED > + + <!ELEMENT inc-compile (dir-changes*,message*)> <!-- 0-1? --> + <!ATTLIST inc-compile tag CDATA #REQUIRED > + <!ATTLIST inc-compile changedFiles CDATA #IMPLIED > + <!ATTLIST inc-compile classesAdded CDATA #IMPLIED > + <!ATTLIST inc-compile classesRemoved CDATA #IMPLIED > + <!ATTLIST inc-compile classesUpdated CDATA #IMPLIED > + + <!ELEMENT run (dir-changes*,message*)> + <!ATTLIST run class CDATA #REQUIRED > + <!ATTLIST run skipTester CDATA #IMPLIED > + <!ATTLIST run options CDATA #IMPLIED > + + <!ELEMENT file (#PCDATA)> + <!ATTLIST file path CDATA #IMPLIED > + + <!ELEMENT dir-changes (#PCDATA)> + <!ATTLIST dir-changes dirToken (classes | run) #IMPLIED > + <!ATTLIST dir-changes defaultSuffix CDATA #IMPLIED > + <!ATTLIST dir-changes added CDATA #IMPLIED > + <!ATTLIST dir-changes removed CDATA #IMPLIED > + <!ATTLIST dir-changes updated CDATA #IMPLIED > + <!ATTLIST dir-changes unchanged CDATA #IMPLIED > + + <!ELEMENT message (#PCDATA)> + <!ATTLIST message kind (error | warning | info | Xlint) #REQUIRED > + <!ATTLIST message line CDATA #REQUIRED > + <!ATTLIST message text CDATA #IMPLIED > + <!ATTLIST message file CDATA #IMPLIED > + ]> + +<suite suiteDir="." verbose="true"> + <!-- + Using OldAjc (no inc-compile), get two errors (updated file not found (b/c cleared?), + deleted file not found. + --> + + <!-- + test harness ability to update and delete source files to prep for a compile + --> + <!-- + test harness ability to detect directory changes + --> + <ajc-test title="report dir-changes fail when expected added class not added" + dir="classAdded" keywords="incremental" > + <compile staging="true" files="main/Main.java"/> + <run class="main.Main"/> + <inc-compile tag="20" > + <dir-changes added="main.ExpectNotAdded"/> + </inc-compile> + </ajc-test> + + <ajc-test title="report dir-changes fail when expected added class exists at start" + dir="classAdded" keywords="incremental" > + <compile staging="true" files="main/Main.java"/> + <run class="main.Main"/> + <inc-compile tag="20" > + <dir-changes added="main.Main"/> + </inc-compile> + </ajc-test> + + <ajc-test title="report dir-changes fail when expected unchanged class changed" + dir="classAdded" keywords="incremental" > + <compile staging="true" files="main/Main.java"/> + <run class="main.Main"/> + <inc-compile tag="20" > + <dir-changes unchanged="main.Main"/> + </inc-compile> + </ajc-test> + + <ajc-test title="report dir-changes fail when expected unchanged class does not exist at start" + dir="classAdded" keywords="incremental" > + <compile staging="true" files="main/Main.java"/> + <run class="main.Main"/> + <inc-compile tag="20" > + <dir-changes unchanged="main.DoesNotExistAtStart"/> + </inc-compile> + </ajc-test> + + <ajc-test title="report dir-changes fail when expected updated class is not updated" + dir="classUnchanged" keywords="incremental" > + <compile staging="true" files="main/Main.java"/> + <run class="main.Main"/> + <inc-compile tag="20" > + <dir-changes updated="main.Target"/> + </inc-compile> + </ajc-test> + + <ajc-test title="report dir-changes fail when expected updated class does not exist at start" + dir="classAdded" keywords="incremental" > + <compile staging="true" files="main/Main.java"/> + <run class="main.Main"/> + <inc-compile tag="20" > + <dir-changes updated="main.DoesNotExistAtStart"/> + </inc-compile> + </ajc-test> + + + <ajc-test title="report dir-changes fail when expected deleted class not deleted" + dir="classAdded" keywords="incremental" > + <compile staging="true" files="main/Main.java"/> + <run class="main.Main"/> + <inc-compile tag="20" > + <dir-changes removed="main.Main"/> + </inc-compile> + </ajc-test> + + <ajc-test title="report dir-changes fail when expected deleted class does not exist at start" + dir="classAdded" keywords="incremental" > + <compile staging="true" files="main/Main.java"/> + <run class="main.Main"/> + <inc-compile tag="20" > + <dir-changes removed="main.DoesNotExistAtStart"/> + </inc-compile> + </ajc-test> + +</suite> |