Browse Source

add testcase for PR 55015

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@1556121 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 11 years ago
parent
commit
875a96d99d
1 changed files with 36 additions and 0 deletions
  1. +36
    -0
      src/tests/antunit/taskdefs/javadoc-test.xml

+ 36
- 0
src/tests/antunit/taskdefs/javadoc-test.xml View File

@@ -71,6 +71,24 @@ Hello World
<mkfoo file="${input}/test/doc-files/b/foo.html"/> <mkfoo file="${input}/test/doc-files/b/foo.html"/>
</target> </target>


<target name="-create-file-with-warning">
<mkdir dir="${input}/test"/>
<echo file="${input}/test/Foo.java"><![CDATA[
package test;

/**
* This is a test class.
*/
public class Foo {
/**
* With a test method.
* @param baz wrong parameter name should cause warning.
*/
public void foo(String bar) {}
}
]]></echo>
</target>

<target name="testPackageSetNoExcludes" depends="-makeTwoTestClasses"> <target name="testPackageSetNoExcludes" depends="-makeTwoTestClasses">
<javadoc destdir="${output}"> <javadoc destdir="${output}">
<packageset dir="${input}"/> <packageset dir="${input}"/>
@@ -91,6 +109,24 @@ Hello World
<au:assertFileDoesntExist file="${output}/test2/B.html"/> <au:assertFileDoesntExist file="${output}/test2/B.html"/>
</target> </target>


<!-- basically tests no exception is thrown -->
<target name="testDontFailOnWarning"
depends="-create-file-with-warning">
<javadoc destdir="${output}">
<packageset dir="${input}"/>
</javadoc>
</target>

<target name="testFailOnWarning"
description="https://issues.apache.org/bugzilla/show_bug.cgi?id=55015"
depends="-create-file-with-warning">
<au:expectfailure>
<javadoc destdir="${output}" failonwarning="true">
<packageset dir="${input}"/>
</javadoc>
</au:expectfailure>
</target>

<target name="XtestNoDocFiles" depends="-setUpDocFilesTests"> <target name="XtestNoDocFiles" depends="-setUpDocFilesTests">
<javadoc destdir="${output}"> <javadoc destdir="${output}">
<packageset dir="${input}"/> <packageset dir="${input}"/>


Loading…
Cancel
Save