diff options
Diffstat (limited to 'framework/src/ant/apache-ant-1.9.6/src/etc/testcases/taskdefs/optional/depend')
15 files changed, 489 insertions, 0 deletions
diff --git a/framework/src/ant/apache-ant-1.9.6/src/etc/testcases/taskdefs/optional/depend/depend.xml b/framework/src/ant/apache-ant-1.9.6/src/etc/testcases/taskdefs/optional/depend/depend.xml new file mode 100644 index 00000000..8465bb02 --- /dev/null +++ b/framework/src/ant/apache-ant-1.9.6/src/etc/testcases/taskdefs/optional/depend/depend.xml @@ -0,0 +1,196 @@ +<?xml version="1.0"?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> + +<project name="depend" basedir="." default="help"> + <import file="../../../buildfiletest-base.xml"/> + + <property name="tempsrc.dir" value="${output}/tempsrc.dir"/> + <property name="cache.dir" value="${output}/tempsrc.dir"/> + <property name="classes.dir" value="${output}/classes"/> + + <target name="setUp"> + <mkdir dir="${output}" /> + + </target> + + <property name="src1.dir" value="src1"/> + <property name="src2.dir" value="src2"/> + <property name="src3.dir" value="src3"/> + <property name="src4.dir" value="src4"/> + <property name="src5.dir" value="src5"/> + + <target name="help"> + <echo>This buildfile is used as part of Ant's test suite.</echo> + </target> + + <target name="src1setup" depends="setUp"> + <copy todir="${tempsrc.dir}"> + <fileset dir="${src1.dir}"/> + </copy> + </target> + + <target name="src2setup" depends="setUp"> + <copy todir="${tempsrc.dir}"> + <fileset dir="${src2.dir}"/> + </copy> + </target> + + <target name="src3setup" depends="setUp"> + <copy todir="${tempsrc.dir}"> + <fileset dir="${src3.dir}"/> + </copy> + </target> + + <target name="src4setup" depends="setUp"> + <copy todir="${tempsrc.dir}"> + <fileset dir="${src4.dir}"/> + </copy> + </target> + + <target name="src5setup" depends="setUp"> + <copy todir="${tempsrc.dir}"> + <fileset dir="${src5.dir}"/> + </copy> + </target> + + <target name="compile"> + <mkdir dir="${classes.dir}"/> + <javac srcdir="${tempsrc.dir}" destdir="${classes.dir}"/> + </target> + + <target name="testdirect"> + <delete file="${tempsrc.dir}/C.java"/> + <copy file="${src1.dir}/C.java" tofile="${tempsrc.dir}/C.java"/> + <depend srcdir="${tempsrc.dir}" destdir="${classes.dir}"/> + <fileset id="result" dir="${classes.dir}"/> + </target> + + <target name="testclosure"> + <delete file="${tempsrc.dir}/C.java"/> + <copy file="${src1.dir}/C.java" tofile="${tempsrc.dir}/C.java"/> + <depend srcdir="${tempsrc.dir}" destdir="${classes.dir}" closure="yes"/> + <fileset id="result" dir="${classes.dir}"/> + </target> + + <target name="testbasicset" depends="src1setup, compile"> + <classfileset id="result" dir="${classes.dir}" rootclass="A"/> + </target> + + <target name="testsmallset" depends="src1setup, compile"> + <classfileset id="result" dir="${classes.dir}" rootclass="B"/> + </target> + + <target name="testresourcecollection" depends="testsmallset"> + <fail> + <condition> + <not> + <and> + <resourcecount count="2" refid="result" /> + <resourcecount count="1"> + <intersect> + <resources refid="result" /> + <file file="${classes.dir}/B.class" /> + </intersect> + </resourcecount> + <resourcecount count="1"> + <intersect> + <resources refid="result" /> + <file file="${classes.dir}/C.class" /> + </intersect> + </resourcecount> + </and> + </not> + </condition> + </fail> + </target> + + <target name="testcomboset" depends="src1setup, compile"> + <classfileset id="result" dir="${classes.dir}" rootclass="B"> + <include name="**/C.class"/> + </classfileset> + </target> + + <target name="testbyreference" depends="src1setup, compile"> + <classfileset id="classSet" dir="${classes.dir}" rootclass="A"> + <include name="**/C.class"/> + </classfileset> + <jar destfile="${tempsrc.dir}/test.jar"> + <fileset refid="classSet"/> + </jar> + </target> + + <target name="testmethodparam" depends="src1setup, compile"> + <classfileset id="result" dir="${classes.dir}" rootclass="E"/> + </target> + + <target name="testinner"> + <delete file="${tempsrc.dir}/B.java"/> + <copy file="${src2.dir}/B.java" tofile="${tempsrc.dir}/B.java"/> + <depend srcdir="${tempsrc.dir}" destdir="${classes.dir}" closure="yes"/> + <fileset id="result" dir="${classes.dir}"/> + </target> + + <target name="testinnerinner"> + <delete file="${tempsrc.dir}/B.java"/> + <copy file="${src3.dir}/B.java" tofile="${tempsrc.dir}/B.java"/> + <depend srcdir="${tempsrc.dir}" destdir="${classes.dir}" closure="yes"/> + <fileset id="result" dir="${classes.dir}"/> + </target> + + <target name="testmethodparaminner" depends="src4setup, compile"> + <classfileset id="result" dir="${classes.dir}" rootclass="test.MethodParam"/> + </target> + + <target name="testnosource" depends="src1setup, compile"> + <depend destdir="${classes.dir}" closure="yes"/> + </target> + + <target name="testemptysource" depends="src1setup, compile"> + <depend srcdir="" destdir="${classes.dir}" closure="yes"/> + </target> + + <target name="testinnerclosure" depends="src4setup"> + <mkdir dir="${classes.dir}"/> + <path id="path.compile"> + <pathelement location="${classes.dir}"/> + </path> + + <javac srcdir="${tempsrc.dir}" destdir="${classes.dir}" + classpathref="path.compile" fork="false" /> + + <depend srcdir="${tempsrc.dir}" destdir="${classes.dir}" + closure="yes" dump="yes" + classpathref="path.compile"/> + + <fileset id="result" dir="${classes.dir}"/> + </target> + + <target name="testcache" depends="src1setup, compile"> + <depend cache="${cache.dir}" srcdir="${tempsrc.dir}" + destdir="${classes.dir}" closure="yes"/> + <depend cache="${cache.dir}" srcdir="${tempsrc.dir}" + destdir="${classes.dir}" closure="yes"/> + </target> + + <target name="testnonpublic"> + <delete file="${tempsrc.dir}/B.java"/> + <copy file="${src2.dir}/B.java" tofile="${tempsrc.dir}/B.java"/> + <depend srcdir="${tempsrc.dir}" destdir="${classes.dir}" closure="yes"/> + <fileset id="result" dir="${classes.dir}"/> + </target> +</project> diff --git a/framework/src/ant/apache-ant-1.9.6/src/etc/testcases/taskdefs/optional/depend/src1/A.java b/framework/src/ant/apache-ant-1.9.6/src/etc/testcases/taskdefs/optional/depend/src1/A.java new file mode 100644 index 00000000..dc6df231 --- /dev/null +++ b/framework/src/ant/apache-ant-1.9.6/src/etc/testcases/taskdefs/optional/depend/src1/A.java @@ -0,0 +1,20 @@ +/* +Licensed to the Apache Software Foundation (ASF) under one or more +contributor license agreements. See the NOTICE file distributed with +this work for additional information regarding copyright ownership. +The ASF licenses this file to You under the Apache License, Version 2.0 +(the "License"); you may not use this file except in compliance with +the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +public class A extends B { + private D d = new D(); +} + diff --git a/framework/src/ant/apache-ant-1.9.6/src/etc/testcases/taskdefs/optional/depend/src1/B.java b/framework/src/ant/apache-ant-1.9.6/src/etc/testcases/taskdefs/optional/depend/src1/B.java new file mode 100644 index 00000000..4be51f78 --- /dev/null +++ b/framework/src/ant/apache-ant-1.9.6/src/etc/testcases/taskdefs/optional/depend/src1/B.java @@ -0,0 +1,19 @@ +/* +Licensed to the Apache Software Foundation (ASF) under one or more +contributor license agreements. See the NOTICE file distributed with +this work for additional information regarding copyright ownership. +The ASF licenses this file to You under the Apache License, Version 2.0 +(the "License"); you may not use this file except in compliance with +the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +public class B extends C { +} + diff --git a/framework/src/ant/apache-ant-1.9.6/src/etc/testcases/taskdefs/optional/depend/src1/C.java b/framework/src/ant/apache-ant-1.9.6/src/etc/testcases/taskdefs/optional/depend/src1/C.java new file mode 100644 index 00000000..d2bfca9d --- /dev/null +++ b/framework/src/ant/apache-ant-1.9.6/src/etc/testcases/taskdefs/optional/depend/src1/C.java @@ -0,0 +1,19 @@ +/* +Licensed to the Apache Software Foundation (ASF) under one or more +contributor license agreements. See the NOTICE file distributed with +this work for additional information regarding copyright ownership. +The ASF licenses this file to You under the Apache License, Version 2.0 +(the "License"); you may not use this file except in compliance with +the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +public class C { +} + diff --git a/framework/src/ant/apache-ant-1.9.6/src/etc/testcases/taskdefs/optional/depend/src1/D.java b/framework/src/ant/apache-ant-1.9.6/src/etc/testcases/taskdefs/optional/depend/src1/D.java new file mode 100644 index 00000000..127de573 --- /dev/null +++ b/framework/src/ant/apache-ant-1.9.6/src/etc/testcases/taskdefs/optional/depend/src1/D.java @@ -0,0 +1,19 @@ +/* +Licensed to the Apache Software Foundation (ASF) under one or more +contributor license agreements. See the NOTICE file distributed with +this work for additional information regarding copyright ownership. +The ASF licenses this file to You under the Apache License, Version 2.0 +(the "License"); you may not use this file except in compliance with +the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +public class D { +} + diff --git a/framework/src/ant/apache-ant-1.9.6/src/etc/testcases/taskdefs/optional/depend/src1/E.java b/framework/src/ant/apache-ant-1.9.6/src/etc/testcases/taskdefs/optional/depend/src1/E.java new file mode 100644 index 00000000..0efd6134 --- /dev/null +++ b/framework/src/ant/apache-ant-1.9.6/src/etc/testcases/taskdefs/optional/depend/src1/E.java @@ -0,0 +1,22 @@ +/* +Licensed to the Apache Software Foundation (ASF) under one or more +contributor license agreements. See the NOTICE file distributed with +this work for additional information regarding copyright ownership. +The ASF licenses this file to You under the Apache License, Version 2.0 +(the "License"); you may not use this file except in compliance with +the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +public class E { + E() { + System.out.println(A.class); + } +} + diff --git a/framework/src/ant/apache-ant-1.9.6/src/etc/testcases/taskdefs/optional/depend/src2/A.java b/framework/src/ant/apache-ant-1.9.6/src/etc/testcases/taskdefs/optional/depend/src2/A.java new file mode 100644 index 00000000..02b35be7 --- /dev/null +++ b/framework/src/ant/apache-ant-1.9.6/src/etc/testcases/taskdefs/optional/depend/src2/A.java @@ -0,0 +1,21 @@ +/* +Licensed to the Apache Software Foundation (ASF) under one or more +contributor license agreements. See the NOTICE file distributed with +this work for additional information regarding copyright ownership. +The ASF licenses this file to You under the Apache License, Version 2.0 +(the "License"); you may not use this file except in compliance with +the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +public class A { + static private class Inner extends B { + } +} + diff --git a/framework/src/ant/apache-ant-1.9.6/src/etc/testcases/taskdefs/optional/depend/src2/B.java b/framework/src/ant/apache-ant-1.9.6/src/etc/testcases/taskdefs/optional/depend/src2/B.java new file mode 100644 index 00000000..bc7b7d24 --- /dev/null +++ b/framework/src/ant/apache-ant-1.9.6/src/etc/testcases/taskdefs/optional/depend/src2/B.java @@ -0,0 +1,19 @@ +/* +Licensed to the Apache Software Foundation (ASF) under one or more +contributor license agreements. See the NOTICE file distributed with +this work for additional information regarding copyright ownership. +The ASF licenses this file to You under the Apache License, Version 2.0 +(the "License"); you may not use this file except in compliance with +the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +public class B { +} + diff --git a/framework/src/ant/apache-ant-1.9.6/src/etc/testcases/taskdefs/optional/depend/src3/A.java b/framework/src/ant/apache-ant-1.9.6/src/etc/testcases/taskdefs/optional/depend/src3/A.java new file mode 100644 index 00000000..1d973b15 --- /dev/null +++ b/framework/src/ant/apache-ant-1.9.6/src/etc/testcases/taskdefs/optional/depend/src3/A.java @@ -0,0 +1,23 @@ +/* +Licensed to the Apache Software Foundation (ASF) under one or more +contributor license agreements. See the NOTICE file distributed with +this work for additional information regarding copyright ownership. +The ASF licenses this file to You under the Apache License, Version 2.0 +(the "License"); you may not use this file except in compliance with +the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +public class A { + static private class Inner { + static private class Inner2 extends B { + } + } +} + diff --git a/framework/src/ant/apache-ant-1.9.6/src/etc/testcases/taskdefs/optional/depend/src3/B.java b/framework/src/ant/apache-ant-1.9.6/src/etc/testcases/taskdefs/optional/depend/src3/B.java new file mode 100644 index 00000000..bc7b7d24 --- /dev/null +++ b/framework/src/ant/apache-ant-1.9.6/src/etc/testcases/taskdefs/optional/depend/src3/B.java @@ -0,0 +1,19 @@ +/* +Licensed to the Apache Software Foundation (ASF) under one or more +contributor license agreements. See the NOTICE file distributed with +this work for additional information regarding copyright ownership. +The ASF licenses this file to You under the Apache License, Version 2.0 +(the "License"); you may not use this file except in compliance with +the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +public class B { +} + diff --git a/framework/src/ant/apache-ant-1.9.6/src/etc/testcases/taskdefs/optional/depend/src4/test/ContainsOnlyInner.java b/framework/src/ant/apache-ant-1.9.6/src/etc/testcases/taskdefs/optional/depend/src4/test/ContainsOnlyInner.java new file mode 100644 index 00000000..d00254b9 --- /dev/null +++ b/framework/src/ant/apache-ant-1.9.6/src/etc/testcases/taskdefs/optional/depend/src4/test/ContainsOnlyInner.java @@ -0,0 +1,24 @@ +/* +Licensed to the Apache Software Foundation (ASF) under one or more +contributor license agreements. See the NOTICE file distributed with +this work for additional information regarding copyright ownership. +The ASF licenses this file to You under the Apache License, Version 2.0 +(the "License"); you may not use this file except in compliance with +the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +package test; + +public class ContainsOnlyInner { + void method1() { + System.out.println(Outer.Inner.class); + } +} + diff --git a/framework/src/ant/apache-ant-1.9.6/src/etc/testcases/taskdefs/optional/depend/src4/test/MethodParam.java b/framework/src/ant/apache-ant-1.9.6/src/etc/testcases/taskdefs/optional/depend/src4/test/MethodParam.java new file mode 100644 index 00000000..276f0163 --- /dev/null +++ b/framework/src/ant/apache-ant-1.9.6/src/etc/testcases/taskdefs/optional/depend/src4/test/MethodParam.java @@ -0,0 +1,24 @@ +/* +Licensed to the Apache Software Foundation (ASF) under one or more +contributor license agreements. See the NOTICE file distributed with +this work for additional information regarding copyright ownership. +The ASF licenses this file to You under the Apache License, Version 2.0 +(the "License"); you may not use this file except in compliance with +the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +package test; + +public class MethodParam { + void method1() { + System.out.print(ContainsOnlyInner.class); + } +} + diff --git a/framework/src/ant/apache-ant-1.9.6/src/etc/testcases/taskdefs/optional/depend/src4/test/Outer.java b/framework/src/ant/apache-ant-1.9.6/src/etc/testcases/taskdefs/optional/depend/src4/test/Outer.java new file mode 100644 index 00000000..0b709002 --- /dev/null +++ b/framework/src/ant/apache-ant-1.9.6/src/etc/testcases/taskdefs/optional/depend/src4/test/Outer.java @@ -0,0 +1,23 @@ +/* +Licensed to the Apache Software Foundation (ASF) under one or more +contributor license agreements. See the NOTICE file distributed with +this work for additional information regarding copyright ownership. +The ASF licenses this file to You under the Apache License, Version 2.0 +(the "License"); you may not use this file except in compliance with +the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +package test; + +public class Outer { + static class Inner { + } +} + diff --git a/framework/src/ant/apache-ant-1.9.6/src/etc/testcases/taskdefs/optional/depend/src5/A.java b/framework/src/ant/apache-ant-1.9.6/src/etc/testcases/taskdefs/optional/depend/src5/A.java new file mode 100644 index 00000000..19521a14 --- /dev/null +++ b/framework/src/ant/apache-ant-1.9.6/src/etc/testcases/taskdefs/optional/depend/src5/A.java @@ -0,0 +1,22 @@ +/* +Licensed to the Apache Software Foundation (ASF) under one or more +contributor license agreements. See the NOTICE file distributed with +this work for additional information regarding copyright ownership. +The ASF licenses this file to You under the Apache License, Version 2.0 +(the "License"); you may not use this file except in compliance with +the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +public class A { + APrivate dependency = new APrivate(); +} + +class APrivate extends B { +} diff --git a/framework/src/ant/apache-ant-1.9.6/src/etc/testcases/taskdefs/optional/depend/src5/B.java b/framework/src/ant/apache-ant-1.9.6/src/etc/testcases/taskdefs/optional/depend/src5/B.java new file mode 100644 index 00000000..bc7b7d24 --- /dev/null +++ b/framework/src/ant/apache-ant-1.9.6/src/etc/testcases/taskdefs/optional/depend/src5/B.java @@ -0,0 +1,19 @@ +/* +Licensed to the Apache Software Foundation (ASF) under one or more +contributor license agreements. See the NOTICE file distributed with +this work for additional information regarding copyright ownership. +The ASF licenses this file to You under the Apache License, Version 2.0 +(the "License"); you may not use this file except in compliance with +the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +public class B { +} + |