mirror of
https://github.com/eclipse-aspectj/aspectj.git
synced 2024-09-13 15:45:38 +02:00
dir-changes tests
This commit is contained in:
parent
fe4fc06aa4
commit
c2bcc9d1c7
@ -341,6 +341,105 @@
|
||||
</compile>
|
||||
</ajc-test>
|
||||
|
||||
<ajc-test dir="harness"
|
||||
title="pass dir-changes: nested and static class">
|
||||
<compile files="DirChangesTest.java">
|
||||
<dir-changes added="DirChangesTest,DirChangesTest$Inner,DirChangesTest$Nested"/>
|
||||
</compile>
|
||||
</ajc-test>
|
||||
|
||||
<ajc-test dir="harness"
|
||||
keywords="expect-fail"
|
||||
title="fail dir-changes: at end, expected file not added .. $Missing..">
|
||||
<compile files="DirChangesTest.java">
|
||||
<dir-changes added="DirChangesTest$Missing"/>
|
||||
</compile>
|
||||
</ajc-test>
|
||||
|
||||
<ajc-test dir="harness/dirchanges-inc"
|
||||
title="pass dir-changes incremental">
|
||||
<compile
|
||||
options="-incremental"
|
||||
staging="true"
|
||||
sourceroots="src">
|
||||
<dir-changes added="Unchanged,Changed"/>
|
||||
</compile>
|
||||
<run class="Changed" options="first"/>
|
||||
<inc-compile tag="20">
|
||||
<dir-changes removed="Removed" updated="Changed"/>
|
||||
</inc-compile>
|
||||
<run class="Changed" options="second"/>
|
||||
</ajc-test>
|
||||
|
||||
<ajc-test dir="harness/dirchanges-inc"
|
||||
keywords="expect-fail"
|
||||
title="fail dir-changes incremental: at start, did not expect added file to exist: {added==}Changed.class">
|
||||
<compile
|
||||
options="-incremental"
|
||||
staging="true"
|
||||
sourceroots="src"/>
|
||||
<inc-compile tag="20">
|
||||
<dir-changes added="Changed"/>
|
||||
</inc-compile>
|
||||
</ajc-test>
|
||||
|
||||
<ajc-test dir="harness/dirchanges-inc"
|
||||
keywords="expect-fail"
|
||||
title="fail dir-changes incremental: at start, expected removed file to exist: {removed==}Missing.class">
|
||||
<compile
|
||||
options="-incremental"
|
||||
staging="true"
|
||||
sourceroots="src">
|
||||
<dir-changes removed="Missing"/>
|
||||
</compile>
|
||||
</ajc-test>
|
||||
|
||||
<ajc-test dir="harness/dirchanges-inc"
|
||||
keywords="expect-fail"
|
||||
title="fail dir-changes incremental: at start, expected updated file to exist: {updated==}Missing.class">
|
||||
<compile
|
||||
options="-incremental"
|
||||
staging="true"
|
||||
sourceroots="src">
|
||||
<dir-changes updated="Missing"/>
|
||||
</compile>
|
||||
</ajc-test>
|
||||
|
||||
<ajc-test dir="harness/dirchanges-inc"
|
||||
keywords="expect-fail"
|
||||
title="fail dir-changes incremental: at end, expected added file to exist: {added==}Missing.class">
|
||||
<compile
|
||||
options="-incremental"
|
||||
staging="true"
|
||||
sourceroots="src">
|
||||
<dir-changes added="Missing"/>
|
||||
</compile>
|
||||
</ajc-test>
|
||||
|
||||
<ajc-test dir="harness/dirchanges-inc"
|
||||
keywords="expect-fail"
|
||||
title="fail dir-changes incremental: at end, did not expect removed file to exist: {removed==}Changed.class">
|
||||
<compile
|
||||
options="-incremental"
|
||||
staging="true"
|
||||
sourceroots="src"/>
|
||||
<inc-compile tag="20">
|
||||
<dir-changes removed="Changed"/>
|
||||
</inc-compile>
|
||||
</ajc-test>
|
||||
|
||||
<ajc-test dir="harness/dirchanges-inc"
|
||||
keywords="expect-fail"
|
||||
title="fail dir-changes incremental: at end, expected updated file to exist: {updated==}Removed.class">
|
||||
<compile
|
||||
options="-incremental"
|
||||
staging="true"
|
||||
sourceroots="src"/>
|
||||
<inc-compile tag="20">
|
||||
<dir-changes updated="Removed"/>
|
||||
</inc-compile>
|
||||
</ajc-test>
|
||||
|
||||
</suite>
|
||||
|
||||
|
||||
|
16
tests/harness/DirChangesTest.java
Normal file
16
tests/harness/DirChangesTest.java
Normal file
@ -0,0 +1,16 @@
|
||||
import org.aspectj.testing.Tester;
|
||||
|
||||
public class DirChangesTest {
|
||||
public static void main (String[] args) {
|
||||
Tester.check(true, "ok");
|
||||
}
|
||||
static class Nested {
|
||||
static int meaningOfLife = 42;
|
||||
}
|
||||
class Inner {
|
||||
int meaningOfLife = 42;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
11
tests/harness/dirchanges-inc/src/Changed.20.java
Normal file
11
tests/harness/dirchanges-inc/src/Changed.20.java
Normal file
@ -0,0 +1,11 @@
|
||||
|
||||
|
||||
public class Changed {
|
||||
public static void main(String[] args) {
|
||||
Unchanged.main(args);
|
||||
String sargs = java.util.Arrays.asList(args).toString();
|
||||
if (!"[second]".equals(sargs)) {
|
||||
throw new Error("expected args [second] but got " + sargs);
|
||||
}
|
||||
}
|
||||
}
|
12
tests/harness/dirchanges-inc/src/Changed.java
Normal file
12
tests/harness/dirchanges-inc/src/Changed.java
Normal file
@ -0,0 +1,12 @@
|
||||
|
||||
import org.aspectj.testing.Tester;
|
||||
|
||||
public class Changed {
|
||||
public static void main(String[] args) {
|
||||
Unchanged.main(args);
|
||||
String sargs = java.util.Arrays.asList(args).toString();
|
||||
if (!"[first]".equals(sargs)) {
|
||||
throw new Error("expected args [first] but got " + sargs);
|
||||
}
|
||||
}
|
||||
}
|
7
tests/harness/dirchanges-inc/src/Removed.delete.20.java
Normal file
7
tests/harness/dirchanges-inc/src/Removed.delete.20.java
Normal file
@ -0,0 +1,7 @@
|
||||
|
||||
|
||||
public class Removed {
|
||||
public static void main(String[] args) {
|
||||
Changed.main(args);
|
||||
}
|
||||
}
|
7
tests/harness/dirchanges-inc/src/Removed.java
Normal file
7
tests/harness/dirchanges-inc/src/Removed.java
Normal file
@ -0,0 +1,7 @@
|
||||
|
||||
|
||||
public class Removed {
|
||||
public static void main(String[] args) {
|
||||
Changed.main(args);
|
||||
}
|
||||
}
|
6
tests/harness/dirchanges-inc/src/Unchanged.java
Normal file
6
tests/harness/dirchanges-inc/src/Unchanged.java
Normal file
@ -0,0 +1,6 @@
|
||||
|
||||
|
||||
public class Unchanged {
|
||||
public static void main(String[] args) {
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user