summaryrefslogtreecommitdiffstats
path: root/test/resources/walls
diff options
context:
space:
mode:
authormattinger <[email protected]>2006-07-06 21:53:00 +0000
committermattinger <[email protected]>2006-07-06 21:53:00 +0000
commit1159111b7a71b72eb04326df33211e1733f7e742 (patch)
treef0a80c384f633e521649654ab78e6239cf5e0d6f /test/resources/walls
Initial addition into subversion with build script changes
git-svn-id: file:///home/sven/projects/JOGL/temp/ant-contrib/svn/ant-contrib-code/trunk/ant-contrib@5 32d7a393-a5a9-423c-abd3-5d954feb1f2f
Diffstat (limited to 'test/resources/walls')
-rw-r--r--test/resources/walls/compilewithwalls.xml237
-rw-r--r--test/resources/walls/dependsafter.xml7
-rw-r--r--test/resources/walls/packageB-break.xml9
-rw-r--r--test/resources/walls/testA/mod/modA/ModuleA.java10
-rw-r--r--test/resources/walls/testA/mod/modB/ModuleB.java6
-rw-r--r--test/resources/walls/testB/mod/modA/TestBModuleA.java7
-rw-r--r--test/resources/walls/testB/mod/modB/TestBModuleB.java9
-rw-r--r--test/resources/walls/testC/mod/TestCModule.java11
-rw-r--r--test/resources/walls/testC/mod/modA/TestCModuleA.java7
-rw-r--r--test/resources/walls/testC/mod/modB/TestCModuleB.java7
-rw-r--r--test/resources/walls/walls.xml9
11 files changed, 319 insertions, 0 deletions
diff --git a/test/resources/walls/compilewithwalls.xml b/test/resources/walls/compilewithwalls.xml
new file mode 100644
index 0000000..6298d76
--- /dev/null
+++ b/test/resources/walls/compilewithwalls.xml
@@ -0,0 +1,237 @@
+<project name="test_compilewithwalls" basedir="." default="cleanup">
+ <property name="test.dir" value="compilewithwalls"/>
+
+ <taskdef resource="net/sf/antcontrib/antcontrib.properties">
+ <classpath location="${antcontrib.jar}"/>
+ </taskdef>
+
+ <target name="cleanup">
+ <delete quiet="yes" dir="${test.dir}"/>
+ </target>
+
+ <target name="init">
+ </target>
+
+ <target name="testTooManyNestedWallElements" depends="init">
+ <compilewithwalls intermediaryBuildDir="${test.dir}/dir2">
+ <walls />
+ <walls />
+ <javac />
+ </compilewithwalls>
+ </target>
+
+ <target name="testTooManyNestedJavacElements" depends="init">
+ <compilewithwalls intermediaryBuildDir="${test.dir}/dir2">
+ <walls />
+ <javac />
+ <javac />
+ </compilewithwalls>
+ </target>
+
+ <target name="testNoWallElement" depends="init">
+ <compilewithwalls intermediaryBuildDir="${test.dir}/dir2">
+ <javac />
+ </compilewithwalls>
+ </target>
+
+ <target name="testNoJavacElement" depends="init">
+ <compilewithwalls intermediaryBuildDir="${test.dir}/dir2">
+ <walls />
+ </compilewithwalls>
+ </target>
+
+ <target name="testNoSrcDirInJavac" depends="init">
+ <compilewithwalls intermediaryBuildDir="${test.dir}/dir2">
+ <walls>
+ <package name="modA" package="biz.xsoftware" />
+ </walls>
+
+ <javac>
+ </javac>
+ </compilewithwalls>
+ </target>
+
+ <target name="testIntermediaryDirAndDestDirSame" depends="init">
+ <mkdir dir="${test.dir}/dir1" />
+ <compilewithwalls intermediaryBuildDir="${test.dir}/dir1">
+ <walls>
+ </walls>
+
+ <javac srcdir="${test.dir}/dir1" destdir="${test.dir}/dir1">
+ </javac>
+ </compilewithwalls>
+ </target>
+
+ <target name="testIntermediaryDirInsideDestDir" depends="init">
+ <mkdir dir="${test.dir}/dir1" />
+ <compilewithwalls intermediaryBuildDir="${test.dir}/dir1/insideDestDir">
+ <walls>
+ </walls>
+
+ <javac srcdir="${test.dir}/dir1" destdir="${test.dir}/dir1">
+ </javac>
+ </compilewithwalls>
+ </target>
+
+ <target name="testPackageDoesntEndWithStar" depends="init">
+ <mkdir dir="${test.dir}/dir1" />
+
+ <compilewithwalls intermediaryBuildDir="${test.dir}/dir2">
+ <walls>
+ <package name="modA" package="biz.xsoftware" />
+ </walls>
+
+ <javac srcdir="${test.dir}/dir1" destdir="${test.dir}/dir1">
+ </javac>
+ </compilewithwalls>
+
+ </target>
+
+ <target name="testPackageDoesntHaveSlash" depends="init">
+ <mkdir dir="${test.dir}/dir1" />
+
+ <compilewithwalls intermediaryBuildDir="${test.dir}/dir2">
+ <walls>
+ <package name="modA" package="biz/xsoftware.*" />
+ </walls>
+
+ <javac srcdir="${test.dir}/dir1" destdir="${test.dir}/dir1">
+ </javac>
+ </compilewithwalls>
+ </target>
+
+ <target name="testDependsOnNonExistPackage" depends="init">
+ <mkdir dir="${test.dir}/dir1" />
+
+ <compilewithwalls intermediaryBuildDir="${test.dir}/dir2">
+ <walls>
+ <package name="modA"
+ package="biz.xsoftware.*"
+ depends="modB" />
+ </walls>
+
+ <javac srcdir="${test.dir}/dir1" destdir="${test.dir}/dir1">
+ </javac>
+ </compilewithwalls>
+
+ </target>
+
+ <target name="testDependsOnPackageAfter" depends="init">
+ <mkdir dir="${test.dir}/dir1" />
+
+ <compilewithwalls intermediaryBuildDir="${test.dir}/dir2">
+ <walls>
+ <package name="modA"
+ package="biz.xsoftware.*"
+ depends="modB" />
+ <package name="modB"
+ package="biz.xsoftware.something.*" />
+ </walls>
+
+ <javac srcdir="${test.dir}/dir1" destdir="${test.dir}/dir1">
+ </javac>
+ </compilewithwalls>
+
+ </target>
+
+ <target name="testPackageABreakingWhenAIsCompiledFirst" depends="init">
+ <mkdir dir="${test.dir}/classes/testA" />
+ <compilewithwalls intermediaryBuildDir="${test.dir}/classes/testAtemp">
+ <walls>
+ <package name="modA"
+ package="mod.modA.*" />
+ <package name="modB"
+ package="mod.modB.*" />
+ <package name="mod"
+ package="mod.*"
+ depends="modA,modB" />
+ </walls>
+
+ <javac srcdir="./testA" destdir="${test.dir}/classes/testA">
+ </javac>
+ </compilewithwalls>
+
+ </target>
+
+ <target name="testPackageBBreakingWhenAIsCompiledFirst" depends="init">
+ <mkdir dir="${test.dir}/classes/testB" />
+ <compilewithwalls intermediaryBuildDir="${test.dir}/classes/testBtemp">
+ <walls>
+ <package name="modA"
+ package="mod.modA.*" />
+ <package name="modB"
+ package="mod.modB.*" />
+ <package name="mod"
+ package="mod.*"
+ depends="modA,modB" />
+ </walls>
+
+ <javac srcdir="./testB" destdir="${test.dir}/classes/testB">
+ </javac>
+ </compilewithwalls>
+
+ </target>
+
+ <target name="testMoreThanOneSrcDirInJavac" depends="init">
+ <mkdir dir="${test.dir}/classes/testX" />
+ <compilewithwalls intermediaryBuildDir="${test.dir}/classes/testXtemp">
+ <walls/>
+ <javac destdir="${test.dir}/classes/testX">
+ <src path="${test.dir}/dir1">
+ </src>
+ <src path="xyz">
+ </src>
+ </javac>
+ </compilewithwalls>
+ </target>
+
+ <target name="testCompileOfAllUsingDepends" depends="init">
+ <mkdir dir="${test.dir}/classes/testC" />
+ <compilewithwalls intermediaryBuildDir="${test.dir}/classes/testCtemp">
+ <walls>
+ <package name="modA"
+ package="mod.modA.*" />
+ <package name="modB"
+ package="mod.modB.*" />
+ <package name="mod"
+ package="mod.*"
+ depends="modA,modB" />
+ </walls>
+
+ <javac srcdir="./testC" destdir="${test.dir}/classes/testC">
+ </javac>
+ </compilewithwalls>
+
+ </target>
+
+<!--
+*********************************************************
+ These are mostly the same tests above but making sure it works with
+ external walls.xml file.
+*********************************************************
+-->
+ <target name="testDependsOnPackageAfterExternalWalls" depends="init">
+ <mkdir dir="${test.dir}/dir1" />
+ <compilewithwalls walls="dependsafter.xml" intermediaryBuildDir="${test.dir}/dir2">
+ <javac srcdir="${test.dir}/dir1" destdir="${test.dir}/dir1">
+ </javac>
+ </compilewithwalls>
+ </target>
+
+ <target name="testPackageBBreakingWhenAIsCompiledFirstExternalWalls" depends="init">
+ <mkdir dir="${test.dir}/classes/testB" />
+ <compilewithwalls walls="packageB-break.xml" intermediaryBuildDir="${test.dir}/classes/testBtemp">
+ <javac srcdir="./testB" destdir="${test.dir}/classes/testB">
+ </javac>
+ </compilewithwalls>
+ </target>
+
+ <target name="testCompileOfAllUsingDependsExternalWalls" depends="init">
+ <mkdir dir="${test.dir}/classes/testC" />
+ <compilewithwalls walls="walls.xml" intermediaryBuildDir="${test.dir}/classes/testCtemp">
+ <javac srcdir="./testC" destdir="${test.dir}/classes/testC">
+ </javac>
+ </compilewithwalls>
+ </target>
+
+</project>
diff --git a/test/resources/walls/dependsafter.xml b/test/resources/walls/dependsafter.xml
new file mode 100644
index 0000000..30aac80
--- /dev/null
+++ b/test/resources/walls/dependsafter.xml
@@ -0,0 +1,7 @@
+ <walls>
+ <package name="modA"
+ package="biz.xsoftware.*"
+ depends="modB" />
+ <package name="modB"
+ package="biz.xsoftware.something.*" />
+ </walls> \ No newline at end of file
diff --git a/test/resources/walls/packageB-break.xml b/test/resources/walls/packageB-break.xml
new file mode 100644
index 0000000..4fa8bb3
--- /dev/null
+++ b/test/resources/walls/packageB-break.xml
@@ -0,0 +1,9 @@
+<walls>
+ <package name="modA"
+ package="mod.modA.*" />
+ <package name="modB"
+ package="mod.modB.*" />
+ <package name="mod"
+ package="mod.*"
+ depends="modA,modB" />
+</walls> \ No newline at end of file
diff --git a/test/resources/walls/testA/mod/modA/ModuleA.java b/test/resources/walls/testA/mod/modA/ModuleA.java
new file mode 100644
index 0000000..6950bdc
--- /dev/null
+++ b/test/resources/walls/testA/mod/modA/ModuleA.java
@@ -0,0 +1,10 @@
+
+package mod.modA;
+
+import mod.modB.ModuleB;
+
+public class ModuleA
+{
+ private ModuleB moduleB;
+
+}; \ No newline at end of file
diff --git a/test/resources/walls/testA/mod/modB/ModuleB.java b/test/resources/walls/testA/mod/modB/ModuleB.java
new file mode 100644
index 0000000..10175b5
--- /dev/null
+++ b/test/resources/walls/testA/mod/modB/ModuleB.java
@@ -0,0 +1,6 @@
+
+package mod.modB;
+
+public class ModuleB
+{
+}; \ No newline at end of file
diff --git a/test/resources/walls/testB/mod/modA/TestBModuleA.java b/test/resources/walls/testB/mod/modA/TestBModuleA.java
new file mode 100644
index 0000000..b6b7929
--- /dev/null
+++ b/test/resources/walls/testB/mod/modA/TestBModuleA.java
@@ -0,0 +1,7 @@
+
+package mod.modA;
+
+public class TestBModuleA
+{
+
+}; \ No newline at end of file
diff --git a/test/resources/walls/testB/mod/modB/TestBModuleB.java b/test/resources/walls/testB/mod/modB/TestBModuleB.java
new file mode 100644
index 0000000..c7428ff
--- /dev/null
+++ b/test/resources/walls/testB/mod/modB/TestBModuleB.java
@@ -0,0 +1,9 @@
+
+package mod.modB;
+
+import mod.modA.TestBModuleA;
+
+public class TestBModuleB
+{
+ private TestBModuleA temp;
+}; \ No newline at end of file
diff --git a/test/resources/walls/testC/mod/TestCModule.java b/test/resources/walls/testC/mod/TestCModule.java
new file mode 100644
index 0000000..5d9c0e8
--- /dev/null
+++ b/test/resources/walls/testC/mod/TestCModule.java
@@ -0,0 +1,11 @@
+
+package mod;
+
+import mod.modA.TestCModuleA;
+import mod.modB.TestCModuleB;
+
+public class TestCModule
+{
+ private TestCModuleA temp1;
+ private TestCModuleB temp2;
+}; \ No newline at end of file
diff --git a/test/resources/walls/testC/mod/modA/TestCModuleA.java b/test/resources/walls/testC/mod/modA/TestCModuleA.java
new file mode 100644
index 0000000..8b9f8d6
--- /dev/null
+++ b/test/resources/walls/testC/mod/modA/TestCModuleA.java
@@ -0,0 +1,7 @@
+
+package mod.modA;
+
+public class TestCModuleA
+{
+
+}; \ No newline at end of file
diff --git a/test/resources/walls/testC/mod/modB/TestCModuleB.java b/test/resources/walls/testC/mod/modB/TestCModuleB.java
new file mode 100644
index 0000000..989ebdf
--- /dev/null
+++ b/test/resources/walls/testC/mod/modB/TestCModuleB.java
@@ -0,0 +1,7 @@
+
+package mod.modB;
+
+
+public class TestCModuleB
+{
+}; \ No newline at end of file
diff --git a/test/resources/walls/walls.xml b/test/resources/walls/walls.xml
new file mode 100644
index 0000000..d5ca6b8
--- /dev/null
+++ b/test/resources/walls/walls.xml
@@ -0,0 +1,9 @@
+<walls>
+ <package name="modA"
+ package="mod.modA.*" />
+ <package name="modB"
+ package="mod.modB.*" />
+ <package name="mod"
+ package="mod.*"
+ depends="modA,modB" />
+</walls> \ No newline at end of file