blob: c519758beb80b0e9fe7a3f054b3f25c7de3e00ca (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
|
<?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>
<!-- this test cannot pass with the new AjAttribute.MethodDeclarationLineNumberAttribute
<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>
-->
<ajc-test dir="aspectSourceAdded"
title="add aspect source file and check world is rewoven"
keywords="incremental-test" >
<compile staging="true"
options="-incremental"
sourceroots="."/>
<inc-compile tag="20">
<dir-changes added="Detour"/>
</inc-compile>
<run class="Main"/>
</ajc-test>
</suite>
|