aboutsummaryrefslogtreecommitdiffstats
path: root/testing-drivers/testdata
diff options
context:
space:
mode:
authorwisberg <wisberg>2002-12-16 21:46:19 +0000
committerwisberg <wisberg>2002-12-16 21:46:19 +0000
commit31b7d84b2b4dc4ba29088947d8872027830e8fe4 (patch)
treeec64d701df1ee2d84272264b6688032f4a860f6d /testing-drivers/testdata
parentc67cb6056cbd89b1fa95ec6a1813793fa18edf16 (diff)
downloadaspectj-31b7d84b2b4dc4ba29088947d8872027830e8fe4.tar.gz
aspectj-31b7d84b2b4dc4ba29088947d8872027830e8fe4.zip
initial versioninitial_CPL
Diffstat (limited to 'testing-drivers/testdata')
-rw-r--r--testing-drivers/testdata/defaultSuite.xml58
-rw-r--r--testing-drivers/testdata/incremental/harness/TestNoTester.java5
-rw-r--r--testing-drivers/testdata/incremental/harness/classAdded/main/Main.20.java11
-rw-r--r--testing-drivers/testdata/incremental/harness/classAdded/main/Main.java7
-rw-r--r--testing-drivers/testdata/incremental/harness/classRemoved/main/Main.20.java8
-rw-r--r--testing-drivers/testdata/incremental/harness/classRemoved/main/Main.java11
-rw-r--r--testing-drivers/testdata/incremental/harness/classUnchanged/main/Main.20.java12
-rw-r--r--testing-drivers/testdata/incremental/harness/classUnchanged/main/Main.java11
-rw-r--r--testing-drivers/testdata/incremental/harness/classUpdated/main/Main.20.java8
-rw-r--r--testing-drivers/testdata/incremental/harness/classUpdated/main/Main.java7
-rw-r--r--testing-drivers/testdata/incremental/harness/defaultPackage/Main.30.java8
-rw-r--r--testing-drivers/testdata/incremental/harness/defaultPackage/Main.40.java7
-rw-r--r--testing-drivers/testdata/incremental/harness/defaultPackage/Main.java7
-rw-r--r--testing-drivers/testdata/incremental/harness/defaultPackage/Target.20.java9
-rw-r--r--testing-drivers/testdata/incremental/harness/defaultPackage/Target.delete.40.java2
-rw-r--r--testing-drivers/testdata/incremental/harness/expClasses/Main.java7
-rw-r--r--testing-drivers/testdata/incremental/harness/expClasses/exp/Main.classbin0 -> 355 bytes
-rw-r--r--testing-drivers/testdata/incremental/harness/selectionTest.xml145
-rw-r--r--testing-drivers/testdata/incremental/harness/sourceAdded/main/Main.30.java12
-rw-r--r--testing-drivers/testdata/incremental/harness/sourceAdded/main/Main.java7
-rw-r--r--testing-drivers/testdata/incremental/harness/sourceAdded/main/Target.20.java9
-rw-r--r--testing-drivers/testdata/incremental/harness/sourceDeleted/delete/DeleteMe.delete.20.java2
-rw-r--r--testing-drivers/testdata/incremental/harness/sourceDeleted/delete/DeleteMe.java7
-rw-r--r--testing-drivers/testdata/incremental/harness/sourceDeleted/delete/Main.java8
-rw-r--r--testing-drivers/testdata/incremental/harness/sourceDeleted/delete/Target.30.java7
-rw-r--r--testing-drivers/testdata/incremental/harness/sourceDeleted/delete/Target.java8
-rw-r--r--testing-drivers/testdata/incremental/harness/suite.xml109
-rw-r--r--testing-drivers/testdata/incremental/harness/suiteFails.xml134
-rw-r--r--testing-drivers/testdata/incremental/inc-suite.xml58
-rw-r--r--testing-drivers/testdata/incremental/java/delete/DeleteMe.delete.20.java5
-rw-r--r--testing-drivers/testdata/incremental/java/delete/DeleteMe.java8
-rw-r--r--testing-drivers/testdata/incremental/java/delete/Main.java9
-rw-r--r--testing-drivers/testdata/incremental/java/delete/Target.30.java9
-rw-r--r--testing-drivers/testdata/incremental/java/delete/Target.java10
-rw-r--r--testing-drivers/testdata/incremental/java/static/Main.30.java9
-rw-r--r--testing-drivers/testdata/incremental/java/static/Main.40.java11
-rw-r--r--testing-drivers/testdata/incremental/java/static/Main.60.java11
-rw-r--r--testing-drivers/testdata/incremental/java/static/Main.java9
-rw-r--r--testing-drivers/testdata/incremental/java/static/Target.20.java8
-rw-r--r--testing-drivers/testdata/incremental/java/static/Target.40.java10
-rw-r--r--testing-drivers/testdata/incremental/java/static/Target.50.java8
-rw-r--r--testing-drivers/testdata/incremental/java/static/Target.java8
42 files changed, 799 insertions, 0 deletions
diff --git a/testing-drivers/testdata/defaultSuite.xml b/testing-drivers/testdata/defaultSuite.xml
new file mode 100644
index 000000000..6687b1de3
--- /dev/null
+++ b/testing-drivers/testdata/defaultSuite.xml
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+
+<!DOCTYPE suite [
+ <!ELEMENT suite (ajc-test+)>
+ <!ATTLIST suite file CDATA #IMPLIED >
+ <!ELEMENT ajc-test (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 (file*,message*)>
+ <!ATTLIST compile files CDATA #IMPLIED >
+ <!ATTLIST compile options CDATA #IMPLIED >
+ <!ATTLIST compile staging (true | false) #IMPLIED >
+
+ <!ELEMENT inc-compile (message*)>
+ <!ATTLIST inc-compile tag CDATA #REQUIRED >
+ <!ATTLIST inc-compile changedFiles CDATA #IMPLIED >
+
+ <!ELEMENT run (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 message (#PCDATA)>
+ <!ATTLIST message kind (error | warning | Xlint) #REQUIRED >
+ <!ATTLIST message line CDATA #REQUIRED >
+ <!ATTLIST message text CDATA #IMPLIED >
+ <!ATTLIST message file CDATA #IMPLIED >
+ ]>
+
+<suite file="defaultSuite.xml">
+
+ <ajc-test dir="incremental/java/static"
+ title="minimal incremental test"
+ keywords="incremental" >
+ <compile staging="true" files="Main.java,Target.java"/>
+ <inc-compile tag="20" changedFiles="Main.java">
+ <message kind="error" line="6" file="Main.java"/>
+ </inc-compile>
+ <inc-compile tag="30"/>
+ <inc-compile tag="40"/>
+ </ajc-test>
+
+ <ajc-test dir="incremental/java/delete"
+ title="minimal incremental test with delete operation"
+ keywords="incremental" >
+ <compile staging="true" files="Main.java,Target.java,DeleteMe.java"/>
+ <inc-compile tag="20">
+ <message kind="error" line="7" file="Target.java" text="*DeleteMe.main*"/>
+ </inc-compile>
+ <inc-compile tag="30"/>
+ </ajc-test>
+
+</suite>
diff --git a/testing-drivers/testdata/incremental/harness/TestNoTester.java b/testing-drivers/testdata/incremental/harness/TestNoTester.java
new file mode 100644
index 000000000..c411c1514
--- /dev/null
+++ b/testing-drivers/testdata/incremental/harness/TestNoTester.java
@@ -0,0 +1,5 @@
+
+public class TestNoTester {
+ public static void main (String[] args) {
+ }
+}
diff --git a/testing-drivers/testdata/incremental/harness/classAdded/main/Main.20.java b/testing-drivers/testdata/incremental/harness/classAdded/main/Main.20.java
new file mode 100644
index 000000000..aae295f7f
--- /dev/null
+++ b/testing-drivers/testdata/incremental/harness/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/testing-drivers/testdata/incremental/harness/classAdded/main/Main.java b/testing-drivers/testdata/incremental/harness/classAdded/main/Main.java
new file mode 100644
index 000000000..185ed42bf
--- /dev/null
+++ b/testing-drivers/testdata/incremental/harness/classAdded/main/Main.java
@@ -0,0 +1,7 @@
+
+package main;
+
+public class Main {
+ public static void main (String[] args) {
+ }
+}
diff --git a/testing-drivers/testdata/incremental/harness/classRemoved/main/Main.20.java b/testing-drivers/testdata/incremental/harness/classRemoved/main/Main.20.java
new file mode 100644
index 000000000..dbe5d38ca
--- /dev/null
+++ b/testing-drivers/testdata/incremental/harness/classRemoved/main/Main.20.java
@@ -0,0 +1,8 @@
+
+package main;
+
+public class Main {
+ public static void main (String[] args) {
+ }
+}
+
diff --git a/testing-drivers/testdata/incremental/harness/classRemoved/main/Main.java b/testing-drivers/testdata/incremental/harness/classRemoved/main/Main.java
new file mode 100644
index 000000000..aae295f7f
--- /dev/null
+++ b/testing-drivers/testdata/incremental/harness/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/testing-drivers/testdata/incremental/harness/classUnchanged/main/Main.20.java b/testing-drivers/testdata/incremental/harness/classUnchanged/main/Main.20.java
new file mode 100644
index 000000000..fba791e7a
--- /dev/null
+++ b/testing-drivers/testdata/incremental/harness/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/testing-drivers/testdata/incremental/harness/classUnchanged/main/Main.java b/testing-drivers/testdata/incremental/harness/classUnchanged/main/Main.java
new file mode 100644
index 000000000..aae295f7f
--- /dev/null
+++ b/testing-drivers/testdata/incremental/harness/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/testing-drivers/testdata/incremental/harness/classUpdated/main/Main.20.java b/testing-drivers/testdata/incremental/harness/classUpdated/main/Main.20.java
new file mode 100644
index 000000000..d0b9d37b4
--- /dev/null
+++ b/testing-drivers/testdata/incremental/harness/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/testing-drivers/testdata/incremental/harness/classUpdated/main/Main.java b/testing-drivers/testdata/incremental/harness/classUpdated/main/Main.java
new file mode 100644
index 000000000..185ed42bf
--- /dev/null
+++ b/testing-drivers/testdata/incremental/harness/classUpdated/main/Main.java
@@ -0,0 +1,7 @@
+
+package main;
+
+public class Main {
+ public static void main (String[] args) {
+ }
+}
diff --git a/testing-drivers/testdata/incremental/harness/defaultPackage/Main.30.java b/testing-drivers/testdata/incremental/harness/defaultPackage/Main.30.java
new file mode 100644
index 000000000..a46687d78
--- /dev/null
+++ b/testing-drivers/testdata/incremental/harness/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/testing-drivers/testdata/incremental/harness/defaultPackage/Main.40.java b/testing-drivers/testdata/incremental/harness/defaultPackage/Main.40.java
new file mode 100644
index 000000000..7616df98c
--- /dev/null
+++ b/testing-drivers/testdata/incremental/harness/defaultPackage/Main.40.java
@@ -0,0 +1,7 @@
+
+// default package
+
+public class Main {
+ public static void main (String[] args) {
+ }
+}
diff --git a/testing-drivers/testdata/incremental/harness/defaultPackage/Main.java b/testing-drivers/testdata/incremental/harness/defaultPackage/Main.java
new file mode 100644
index 000000000..66b7433e4
--- /dev/null
+++ b/testing-drivers/testdata/incremental/harness/defaultPackage/Main.java
@@ -0,0 +1,7 @@
+
+// default package
+
+public class Main {
+ public static void main (String[] args) {
+ }
+}
diff --git a/testing-drivers/testdata/incremental/harness/defaultPackage/Target.20.java b/testing-drivers/testdata/incremental/harness/defaultPackage/Target.20.java
new file mode 100644
index 000000000..d67b06569
--- /dev/null
+++ b/testing-drivers/testdata/incremental/harness/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/testing-drivers/testdata/incremental/harness/defaultPackage/Target.delete.40.java b/testing-drivers/testdata/incremental/harness/defaultPackage/Target.delete.40.java
new file mode 100644
index 000000000..187c8a8e6
--- /dev/null
+++ b/testing-drivers/testdata/incremental/harness/defaultPackage/Target.delete.40.java
@@ -0,0 +1,2 @@
+
+// delete this file \ No newline at end of file
diff --git a/testing-drivers/testdata/incremental/harness/expClasses/Main.java b/testing-drivers/testdata/incremental/harness/expClasses/Main.java
new file mode 100644
index 000000000..66b7433e4
--- /dev/null
+++ b/testing-drivers/testdata/incremental/harness/expClasses/Main.java
@@ -0,0 +1,7 @@
+
+// default package
+
+public class Main {
+ public static void main (String[] args) {
+ }
+}
diff --git a/testing-drivers/testdata/incremental/harness/expClasses/exp/Main.class b/testing-drivers/testdata/incremental/harness/expClasses/exp/Main.class
new file mode 100644
index 000000000..fba840b69
--- /dev/null
+++ b/testing-drivers/testdata/incremental/harness/expClasses/exp/Main.class
Binary files differ
diff --git a/testing-drivers/testdata/incremental/harness/selectionTest.xml b/testing-drivers/testdata/incremental/harness/selectionTest.xml
new file mode 100644
index 000000000..1657317e8
--- /dev/null
+++ b/testing-drivers/testdata/incremental/harness/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/testing-drivers/testdata/incremental/harness/sourceAdded/main/Main.30.java b/testing-drivers/testdata/incremental/harness/sourceAdded/main/Main.30.java
new file mode 100644
index 000000000..59564d39c
--- /dev/null
+++ b/testing-drivers/testdata/incremental/harness/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/testing-drivers/testdata/incremental/harness/sourceAdded/main/Main.java b/testing-drivers/testdata/incremental/harness/sourceAdded/main/Main.java
new file mode 100644
index 000000000..185ed42bf
--- /dev/null
+++ b/testing-drivers/testdata/incremental/harness/sourceAdded/main/Main.java
@@ -0,0 +1,7 @@
+
+package main;
+
+public class Main {
+ public static void main (String[] args) {
+ }
+}
diff --git a/testing-drivers/testdata/incremental/harness/sourceAdded/main/Target.20.java b/testing-drivers/testdata/incremental/harness/sourceAdded/main/Target.20.java
new file mode 100644
index 000000000..985587eec
--- /dev/null
+++ b/testing-drivers/testdata/incremental/harness/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/testing-drivers/testdata/incremental/harness/sourceDeleted/delete/DeleteMe.delete.20.java b/testing-drivers/testdata/incremental/harness/sourceDeleted/delete/DeleteMe.delete.20.java
new file mode 100644
index 000000000..345047b16
--- /dev/null
+++ b/testing-drivers/testdata/incremental/harness/sourceDeleted/delete/DeleteMe.delete.20.java
@@ -0,0 +1,2 @@
+
+// delete file DeleteMe.java \ No newline at end of file
diff --git a/testing-drivers/testdata/incremental/harness/sourceDeleted/delete/DeleteMe.java b/testing-drivers/testdata/incremental/harness/sourceDeleted/delete/DeleteMe.java
new file mode 100644
index 000000000..9057235ff
--- /dev/null
+++ b/testing-drivers/testdata/incremental/harness/sourceDeleted/delete/DeleteMe.java
@@ -0,0 +1,7 @@
+
+package delete;
+
+public class DeleteMe {
+ static void run() {
+ }
+}
diff --git a/testing-drivers/testdata/incremental/harness/sourceDeleted/delete/Main.java b/testing-drivers/testdata/incremental/harness/sourceDeleted/delete/Main.java
new file mode 100644
index 000000000..e180e46c8
--- /dev/null
+++ b/testing-drivers/testdata/incremental/harness/sourceDeleted/delete/Main.java
@@ -0,0 +1,8 @@
+
+package delete;
+
+public class Main {
+ public static void main(String[] args) {
+ Target.run();
+ }
+}
diff --git a/testing-drivers/testdata/incremental/harness/sourceDeleted/delete/Target.30.java b/testing-drivers/testdata/incremental/harness/sourceDeleted/delete/Target.30.java
new file mode 100644
index 000000000..1678b7055
--- /dev/null
+++ b/testing-drivers/testdata/incremental/harness/sourceDeleted/delete/Target.30.java
@@ -0,0 +1,7 @@
+
+package delete;
+
+public class Target {
+ static void run() {
+ }
+}
diff --git a/testing-drivers/testdata/incremental/harness/sourceDeleted/delete/Target.java b/testing-drivers/testdata/incremental/harness/sourceDeleted/delete/Target.java
new file mode 100644
index 000000000..a19401904
--- /dev/null
+++ b/testing-drivers/testdata/incremental/harness/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/testing-drivers/testdata/incremental/harness/suite.xml b/testing-drivers/testdata/incremental/harness/suite.xml
new file mode 100644
index 000000000..b6b568384
--- /dev/null
+++ b/testing-drivers/testdata/incremental/harness/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/testing-drivers/testdata/incremental/harness/suiteFails.xml b/testing-drivers/testdata/incremental/harness/suiteFails.xml
new file mode 100644
index 000000000..8bf7f7404
--- /dev/null
+++ b/testing-drivers/testdata/incremental/harness/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>
diff --git a/testing-drivers/testdata/incremental/inc-suite.xml b/testing-drivers/testdata/incremental/inc-suite.xml
new file mode 100644
index 000000000..468b89a1f
--- /dev/null
+++ b/testing-drivers/testdata/incremental/inc-suite.xml
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+
+<!DOCTYPE suite [
+ <!ELEMENT suite (ajc-test+)>
+ <!ATTLIST suite file CDATA #IMPLIED >
+ <!ELEMENT ajc-test (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 (file*,message*)>
+ <!ATTLIST compile files CDATA #IMPLIED >
+ <!ATTLIST compile options CDATA #IMPLIED >
+ <!ATTLIST compile staging (true | false) #IMPLIED >
+
+ <!ELEMENT inc-compile (message*)>
+ <!ATTLIST inc-compile tag CDATA #REQUIRED >
+ <!ATTLIST inc-compile changedFiles CDATA #IMPLIED >
+
+ <!ELEMENT run (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 message (#PCDATA)>
+ <!ATTLIST message kind (error | warning | Xlint) #REQUIRED >
+ <!ATTLIST message line CDATA #REQUIRED >
+ <!ATTLIST message text CDATA #IMPLIED >
+ <!ATTLIST message file CDATA #IMPLIED >
+ ]>
+
+<suite file="inc-suite.xml">
+
+ <ajc-test dir="java/static"
+ title="minimal incremental test"
+ keywords="incremental" >
+ <compile staging="true" files="Main.java,Target.java"/>
+ <inc-compile tag="20" changedFiles="Main.java">
+ <message kind="error" line="6" file="Main.java"/>
+ </inc-compile>
+ <inc-compile tag="30"/>
+ <inc-compile tag="40"/>
+ </ajc-test>
+
+ <ajc-test dir="java/delete"
+ title="minimal incremental test with delete operation"
+ keywords="incremental" >
+ <compile staging="true" files="Main.java,Target.java,DeleteMe.java"/>
+ <inc-compile tag="20">
+ <message kind="error" line="7" file="Target.java" text="*DeleteMe.main*"/>
+ </inc-compile>
+ <inc-compile tag="30"/>
+ </ajc-test>
+
+</suite>
diff --git a/testing-drivers/testdata/incremental/java/delete/DeleteMe.delete.20.java b/testing-drivers/testdata/incremental/java/delete/DeleteMe.delete.20.java
new file mode 100644
index 000000000..6beafcc3d
--- /dev/null
+++ b/testing-drivers/testdata/incremental/java/delete/DeleteMe.delete.20.java
@@ -0,0 +1,5 @@
+public class Main {
+ public static void main (String[] args) {
+ }
+}
+
diff --git a/testing-drivers/testdata/incremental/java/delete/DeleteMe.java b/testing-drivers/testdata/incremental/java/delete/DeleteMe.java
new file mode 100644
index 000000000..0f8d29157
--- /dev/null
+++ b/testing-drivers/testdata/incremental/java/delete/DeleteMe.java
@@ -0,0 +1,8 @@
+
+
+
+public class DeleteMe {
+ public static void main (String[] args) {
+ }
+}
+
diff --git a/testing-drivers/testdata/incremental/java/delete/Main.java b/testing-drivers/testdata/incremental/java/delete/Main.java
new file mode 100644
index 000000000..db1d83469
--- /dev/null
+++ b/testing-drivers/testdata/incremental/java/delete/Main.java
@@ -0,0 +1,9 @@
+
+// default package
+
+public class Main {
+ public static void main (String[] args) {
+ Target.staticMethod();
+ }
+}
+
diff --git a/testing-drivers/testdata/incremental/java/delete/Target.30.java b/testing-drivers/testdata/incremental/java/delete/Target.30.java
new file mode 100644
index 000000000..8ae9dc730
--- /dev/null
+++ b/testing-drivers/testdata/incremental/java/delete/Target.30.java
@@ -0,0 +1,9 @@
+
+
+// default package
+
+class Target {
+ static void staticMethod() {
+ }
+
+}
diff --git a/testing-drivers/testdata/incremental/java/delete/Target.java b/testing-drivers/testdata/incremental/java/delete/Target.java
new file mode 100644
index 000000000..1ae129b7c
--- /dev/null
+++ b/testing-drivers/testdata/incremental/java/delete/Target.java
@@ -0,0 +1,10 @@
+
+
+// default package
+
+class Target {
+ static void staticMethod() {
+ DeleteMe.main(new String[0]);
+ }
+
+}
diff --git a/testing-drivers/testdata/incremental/java/static/Main.30.java b/testing-drivers/testdata/incremental/java/static/Main.30.java
new file mode 100644
index 000000000..a032688c5
--- /dev/null
+++ b/testing-drivers/testdata/incremental/java/static/Main.30.java
@@ -0,0 +1,9 @@
+
+// default package
+
+public class Main {
+ public static void main (String[] args) {
+ Target.staticMethod(1);
+ }
+}
+
diff --git a/testing-drivers/testdata/incremental/java/static/Main.40.java b/testing-drivers/testdata/incremental/java/static/Main.40.java
new file mode 100644
index 000000000..3286e34f8
--- /dev/null
+++ b/testing-drivers/testdata/incremental/java/static/Main.40.java
@@ -0,0 +1,11 @@
+
+// default package
+
+public class Main {
+ public static void main (String[] args) {
+ Target.staticMethod(1);
+ }
+
+ static Target.Inner foo = null;
+}
+
diff --git a/testing-drivers/testdata/incremental/java/static/Main.60.java b/testing-drivers/testdata/incremental/java/static/Main.60.java
new file mode 100644
index 000000000..3286e34f8
--- /dev/null
+++ b/testing-drivers/testdata/incremental/java/static/Main.60.java
@@ -0,0 +1,11 @@
+
+// default package
+
+public class Main {
+ public static void main (String[] args) {
+ Target.staticMethod(1);
+ }
+
+ static Target.Inner foo = null;
+}
+
diff --git a/testing-drivers/testdata/incremental/java/static/Main.java b/testing-drivers/testdata/incremental/java/static/Main.java
new file mode 100644
index 000000000..db1d83469
--- /dev/null
+++ b/testing-drivers/testdata/incremental/java/static/Main.java
@@ -0,0 +1,9 @@
+
+// default package
+
+public class Main {
+ public static void main (String[] args) {
+ Target.staticMethod();
+ }
+}
+
diff --git a/testing-drivers/testdata/incremental/java/static/Target.20.java b/testing-drivers/testdata/incremental/java/static/Target.20.java
new file mode 100644
index 000000000..dc0764c69
--- /dev/null
+++ b/testing-drivers/testdata/incremental/java/static/Target.20.java
@@ -0,0 +1,8 @@
+
+
+// default package
+
+class Target {
+ static void staticMethod(int i) { // CE Main.java:6
+ }
+}
diff --git a/testing-drivers/testdata/incremental/java/static/Target.40.java b/testing-drivers/testdata/incremental/java/static/Target.40.java
new file mode 100644
index 000000000..bd0a3ed3e
--- /dev/null
+++ b/testing-drivers/testdata/incremental/java/static/Target.40.java
@@ -0,0 +1,10 @@
+
+
+// default package
+
+class Target {
+ static void staticMethod(int i) { // CE Main.java:6
+ }
+
+ static class Inner {}
+}
diff --git a/testing-drivers/testdata/incremental/java/static/Target.50.java b/testing-drivers/testdata/incremental/java/static/Target.50.java
new file mode 100644
index 000000000..dc0764c69
--- /dev/null
+++ b/testing-drivers/testdata/incremental/java/static/Target.50.java
@@ -0,0 +1,8 @@
+
+
+// default package
+
+class Target {
+ static void staticMethod(int i) { // CE Main.java:6
+ }
+}
diff --git a/testing-drivers/testdata/incremental/java/static/Target.java b/testing-drivers/testdata/incremental/java/static/Target.java
new file mode 100644
index 000000000..581afbab9
--- /dev/null
+++ b/testing-drivers/testdata/incremental/java/static/Target.java
@@ -0,0 +1,8 @@
+
+
+// default package
+
+class Target {
+ static void staticMethod() {
+ }
+}