ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject svn commit: r373999 - in /ant/core/trunk/src: etc/testcases/taskdefs/javadoc/ etc/testcases/taskdefs/javadoc/java/ testcases/org/apache/tools/ant/taskdefs/
Date Wed, 01 Feb 2006 05:45:15 GMT
Author: bodewig
Date: Tue Jan 31 21:45:08 2006
New Revision: 373999

URL: http://svn.apache.org/viewcvs?rev=373999&view=rev
Log:
tests for 38370

Added:
    ant/core/trunk/src/etc/testcases/taskdefs/javadoc/
    ant/core/trunk/src/etc/testcases/taskdefs/javadoc/java/
    ant/core/trunk/src/etc/testcases/taskdefs/javadoc/java/ClassToJavadoc.java   (with props)
    ant/core/trunk/src/etc/testcases/taskdefs/javadoc/javadoc.xml   (with props)
    ant/core/trunk/src/testcases/org/apache/tools/ant/taskdefs/JavadocTest.java   (with props)

Added: ant/core/trunk/src/etc/testcases/taskdefs/javadoc/java/ClassToJavadoc.java
URL: http://svn.apache.org/viewcvs/ant/core/trunk/src/etc/testcases/taskdefs/javadoc/java/ClassToJavadoc.java?rev=373999&view=auto
==============================================================================
--- ant/core/trunk/src/etc/testcases/taskdefs/javadoc/java/ClassToJavadoc.java (added)
+++ ant/core/trunk/src/etc/testcases/taskdefs/javadoc/java/ClassToJavadoc.java Tue Jan 31
21:45:08 2006
@@ -0,0 +1,38 @@
+/*
+ * Copyright 2006 The Apache Software Foundation
+ *
+ *  Licensed 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 etc.testcases.taskdefs.javadoc.java;
+
+/**
+ * This is a simple class to provide grist for the javadoc mill
+ * while testing it.
+ */
+public class ClassToJavadoc {
+    /**
+     * @param anArgument A String that is ignored
+     */
+    public void methodToJavadoc(String anArgument) { }
+
+    /**
+     * @see java.lang.Object#toString()
+     */
+    public String toString() { return this.getClass().getName(); }
+    
+    /**
+     * @return An arbitrary string.
+     */
+    public String anotherString() {return "An arbitrary string.";}
+}

Propchange: ant/core/trunk/src/etc/testcases/taskdefs/javadoc/java/ClassToJavadoc.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ant/core/trunk/src/etc/testcases/taskdefs/javadoc/java/ClassToJavadoc.java
------------------------------------------------------------------------------
    svn:executable = *

Added: ant/core/trunk/src/etc/testcases/taskdefs/javadoc/javadoc.xml
URL: http://svn.apache.org/viewcvs/ant/core/trunk/src/etc/testcases/taskdefs/javadoc/javadoc.xml?rev=373999&view=auto
==============================================================================
--- ant/core/trunk/src/etc/testcases/taskdefs/javadoc/javadoc.xml (added)
+++ ant/core/trunk/src/etc/testcases/taskdefs/javadoc/javadoc.xml Tue Jan 31 21:45:08 2006
@@ -0,0 +1,111 @@
+<!--
+ * Copyright 2006 The Apache Software Foundation
+ *
+ *  Licensed 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="javadoc" basedir=".">
+  <path id="path.dirset">
+    <dirset dir="java/" />
+  </path>
+
+  <target name="dirsetPath">
+    <javadoc sourcepathref="path.dirset" packagenames="*" destdir="javadoc" />
+  </target>
+
+  <target name="dirsetPathWithoutPackagenames">
+    <javadoc sourcepathref="path.dirset" destdir="javadoc" />
+  </target>
+
+  <target name="nestedDirsetPath">
+    <javadoc packagenames="*" destdir="javadoc">
+      <sourcepath refid="path.dirset" />
+    </javadoc>
+  </target>
+
+  <path id="path.fileset">
+    <pathelement location="."/>
+    <fileset dir="java/" id="fileset.inpath">
+      <include name="**/*.java" />
+    </fileset>
+  </path>
+
+  <target name="filesetPath">
+    <javadoc sourcepathref="path.fileset" packagenames="*" destdir="javadoc" />
+  </target>
+
+  <target name="nestedFilesetPath">
+    <javadoc packagenames="*" destdir="javadoc">
+      <sourcepath refid="path.fileset" />
+    </javadoc>
+  </target>
+
+  <target name="nestedFilesetRefInPath">
+    <javadoc packagenames="*" destdir="javadoc">
+      <fileset refid="fileset.inpath" />
+    </javadoc>
+  </target>
+
+  <path id="path.filelist">
+    <pathelement location="."/>
+    <filelist dir="java/">
+      <file name="ClassToJavadoc.java" />
+    </filelist>
+  </path>
+
+  <target name="filelistPath">
+    <javadoc sourcepathref="path.filelist" packagenames="*"
+      destdir="javadoc" />
+  </target>
+
+  <target name="nestedFilelistPath">
+    <javadoc packagenames="*" destdir="javadoc">
+      <sourcepath refid="path.filelist" />
+    </javadoc>
+  </target>
+
+  <path id="path.pathelement.path">
+    <pathelement path="java/" />
+  </path>
+
+  <target name="pathelementPath">
+    <javadoc sourcepathref="path.pathelement.path"
+      packagenames="*" destdir="javadoc" />
+  </target>
+
+  <path id="path.pathelement.location">
+    <pathelement location="."/>
+    <pathelement path="java/ClassToJavadoc.java" />
+  </path>
+
+  <target name="pathelementLocationPath">
+    <javadoc sourcepathref="path.pathelement.location"
+      packagenames="*" destdir="javadoc" />
+  </target>
+
+  <target name="nestedSource">
+    <javadoc destdir="javadoc">
+      <source file="java/ClassToJavadoc.java" />
+    </javadoc>
+  </target>
+
+  <fileset dir="java/" id="fileset.simple">
+    <include name="**/*.java" />
+  </fileset>
+
+  <target name="nestedFilesetRef">
+    <javadoc destdir="javadoc">
+      <fileset refid="fileset.simple" />
+    </javadoc>
+  </target>
+</project>
\ No newline at end of file

Propchange: ant/core/trunk/src/etc/testcases/taskdefs/javadoc/javadoc.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ant/core/trunk/src/etc/testcases/taskdefs/javadoc/javadoc.xml
------------------------------------------------------------------------------
    svn:executable = *

Added: ant/core/trunk/src/testcases/org/apache/tools/ant/taskdefs/JavadocTest.java
URL: http://svn.apache.org/viewcvs/ant/core/trunk/src/testcases/org/apache/tools/ant/taskdefs/JavadocTest.java?rev=373999&view=auto
==============================================================================
--- ant/core/trunk/src/testcases/org/apache/tools/ant/taskdefs/JavadocTest.java (added)
+++ ant/core/trunk/src/testcases/org/apache/tools/ant/taskdefs/JavadocTest.java Tue Jan 31
21:45:08 2006
@@ -0,0 +1,121 @@
+/*
+ * Copyright 2006 The Apache Software Foundation
+ *
+ *  Licensed 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 org.apache.tools.ant.taskdefs;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.BuildFileTest;
+
+public class JavadocTest extends BuildFileTest {
+
+    public JavadocTest(String name) {
+        super(name);
+    }
+
+    private static final String BUILD_PATH = "src/etc/testcases/taskdefs/javadoc/";
+    private static final String BUILD_FILENAME = "javadoc.xml";
+    private static final String BUILD_FILE = BUILD_PATH + BUILD_FILENAME;
+
+    protected void setUp() throws Exception {
+        super.setUp();
+        configureProject(BUILD_FILE);
+    }
+
+    // PR 38370
+    public void testDirsetPath() throws Exception {
+        executeTarget("dirsetPath");
+    }
+
+    // PR 38370
+    public void XtestDirsetPathWithoutPackagenames() throws Exception {
+        try {
+            executeTarget("dirsetPathWithoutPackagenames");
+        } catch (BuildException e) {
+            fail("Contents of path should be picked up without specifying package names:
" + e);
+        }
+    }
+
+    // PR 38370
+    public void testNestedDirsetPath() throws Exception {
+        executeTarget("nestedDirsetPath");
+    }
+
+    // PR 38370
+    public void testFilesetPath() throws Exception {
+        try {
+            executeTarget("filesetPath");
+        } catch (BuildException e) {
+            fail("A path can contain filesets: " + e);
+        }
+    }
+
+    // PR 38370
+    public void testNestedFilesetPath() throws Exception {
+        try {
+            executeTarget("nestedFilesetPath");
+        } catch (BuildException e) {
+            fail("A path can contain nested filesets: " + e);
+        }
+    }
+
+    // PR 38370
+    public void testFilelistPath() throws Exception {
+        try {
+            executeTarget("filelistPath");
+        } catch (BuildException e) {
+            fail("A path can contain filelists: " + e);
+        }
+    }
+
+    // PR 38370
+    public void testNestedFilelistPath() throws Exception {
+        try {
+            executeTarget("nestedFilelistPath");
+        } catch (BuildException e) {
+            fail("A path can contain nested filelists: " + e);
+        }
+    }
+
+    // PR 38370
+    public void testPathelementPath() throws Exception {
+        executeTarget("pathelementPath");
+    }
+
+    // PR 38370
+    public void testPathelementLocationPath() throws Exception {
+        try {
+            executeTarget("pathelementLocationPath");
+        } catch (BuildException e) {
+            fail("A path can contain pathelements pointing to a file: " + e);
+        }
+    }
+
+    // PR 38370
+    public void testNestedSource() throws Exception {
+        executeTarget("nestedSource");
+    }
+
+    // PR 38370
+    public void testNestedFilesetRef() throws Exception {
+        executeTarget("nestedFilesetRef");
+    }
+
+    // PR 38370
+    public void testNestedFilesetRefInPath() throws Exception {
+        executeTarget("nestedFilesetRefInPath");
+    }
+}

Propchange: ant/core/trunk/src/testcases/org/apache/tools/ant/taskdefs/JavadocTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ant/core/trunk/src/testcases/org/apache/tools/ant/taskdefs/JavadocTest.java
------------------------------------------------------------------------------
    svn:executable = *



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message