diff --git a/langtools/test/com/sun/javadoc/lib/JavadocTester.java b/langtools/test/com/sun/javadoc/lib/JavadocTester.java index 5149d9301fc..6773ec144a7 100644 --- a/langtools/test/com/sun/javadoc/lib/JavadocTester.java +++ b/langtools/test/com/sun/javadoc/lib/JavadocTester.java @@ -113,6 +113,46 @@ public abstract class JavadocTester { */ private File outputDir; + /** + * Alternatives for checking the contents of a directory. + */ + enum DirectoryCheck { + /** + * Check that the directory is empty. + */ + EMPTY((file, name) -> true), + /** + * Check that the directory does not contain any HTML files, + * such as may have been generated by a prior run of javadoc + * using this directory. + * For now, the check is only performed on the top level directory. + */ + NO_HTML_FILES((file, name) -> name.endsWith(".html")), + /** + * No check is performed on the directory contents. + */ + NONE(null) { @Override void check(File dir) { } }; + + /** The filter used to detect that files should not be present. */ + FilenameFilter filter; + + DirectoryCheck(FilenameFilter f) { + filter = f; + } + + void check(File dir) { + if (dir.isDirectory()) { + String[] contents = dir.list(filter); + if (contents == null) + throw new Error("cannot list directory: " + dir); + if (contents.length > 0) + throw new Error("directory has unexpected content: " + dir); + } + } + } + + private DirectoryCheck outputDirectoryCheck = DirectoryCheck.EMPTY; + /** * The current subtest number. */ @@ -206,6 +246,8 @@ public abstract class JavadocTester { } } + outputDirectoryCheck.check(outputDir); + ByteArrayOutputStream stdout = new ByteArrayOutputStream(); PrintStream prevOut = System.out; System.setOut(new PrintStream(stdout)); @@ -231,6 +273,15 @@ public abstract class JavadocTester { return returnCode; } + /** + * Set a filter to check the initial contents of the output directory + * before javadoc is run. + * The filter should return true for files that should not appear. + */ + public void setCheckOutputDirectoryCheck(DirectoryCheck c) { + outputDirectoryCheck = c; + } + /** * Create new string writer buffers */ diff --git a/langtools/test/com/sun/javadoc/testDocFileDir/TestDocFileDir.java b/langtools/test/com/sun/javadoc/testDocFileDir/TestDocFileDir.java index 3f263f6a1f3..c939e49dc46 100644 --- a/langtools/test/com/sun/javadoc/testDocFileDir/TestDocFileDir.java +++ b/langtools/test/com/sun/javadoc/testDocFileDir/TestDocFileDir.java @@ -86,10 +86,12 @@ public class TestDocFileDir extends JavadocTester { */ public static void main(String[] args) { TestDocFileDir tester = new TestDocFileDir(); + tester.setCheckOutputDirectoryCheck(DirectoryCheck.NO_HTML_FILES); copyDir(SRC_DIR + "/pkg", "."); tester.run(ARGS0, TEST0, NO_TEST); copyDir(SRC_DIR + "/pkg", OUTPUT_DIR + "-1"); tester.run(ARGS1, TEST1, NO_TEST); + tester.setCheckOutputDirectoryCheck(DirectoryCheck.NONE); tester.run(ARGS2, NO_TEST, NO_TEST, FILE_TEST2, FILE_NEGATED_TEST2); tester.printSummary(); } diff --git a/langtools/test/com/sun/javadoc/testGeneratedBy/TestGeneratedBy.java b/langtools/test/com/sun/javadoc/testGeneratedBy/TestGeneratedBy.java index a43bdc17b35..8d7b090df39 100644 --- a/langtools/test/com/sun/javadoc/testGeneratedBy/TestGeneratedBy.java +++ b/langtools/test/com/sun/javadoc/testGeneratedBy/TestGeneratedBy.java @@ -58,7 +58,7 @@ public class TestGeneratedBy extends JavadocTester { private static final String[] NO_TIMESTAMP_ARGS = new String[] { "-notimestamp", - "-d", OUTPUT_DIR, + "-d", OUTPUT_DIR + "-1", "-sourcepath", SRC_DIR, "pkg" }; diff --git a/langtools/test/com/sun/javadoc/testGroupOption/TestGroupOption.java b/langtools/test/com/sun/javadoc/testGroupOption/TestGroupOption.java index d86eaba77db..b1cdc9b8334 100644 --- a/langtools/test/com/sun/javadoc/testGroupOption/TestGroupOption.java +++ b/langtools/test/com/sun/javadoc/testGroupOption/TestGroupOption.java @@ -45,7 +45,7 @@ public class TestGroupOption extends JavadocTester { }; private static final String[] ARGS2 = new String[] { - "-d", OUTPUT_DIR, "-sourcepath", SRC_DIR, + "-d", OUTPUT_DIR + "-1", "-sourcepath", SRC_DIR, "-group", "Package One", "pkg1", "-group", "Package One", "pkg2", "-group", "Package One", "pkg3", diff --git a/langtools/test/com/sun/javadoc/testHtmlDefinitionListTag/TestHtmlDefinitionListTag.java b/langtools/test/com/sun/javadoc/testHtmlDefinitionListTag/TestHtmlDefinitionListTag.java index ec111e9d9e2..7b3e4f685ca 100644 --- a/langtools/test/com/sun/javadoc/testHtmlDefinitionListTag/TestHtmlDefinitionListTag.java +++ b/langtools/test/com/sun/javadoc/testHtmlDefinitionListTag/TestHtmlDefinitionListTag.java @@ -40,127 +40,134 @@ public class TestHtmlDefinitionListTag extends JavadocTester { // Optional Element should print properly nested definition list tags // for default value. private static final String[][] TEST_ALL = { - { "pkg1/C1.html", "
public class " +
-                 "C1\n" +
-                 "extends java.lang.Object\n" +
-                 "implements java.io.Serializable
"}, - { "pkg1/C4.html", "
\n" + - "
Default:
\n" + - "
true
\n" + - "
"}}; + { "pkg1/C1.html", + "
public class C1\n" +
+                "extends java.lang.Object\n" +
+                "implements java.io.Serializable
"}, + { "pkg1/C4.html", + "
\n" + + "
Default:
\n" + + "
true
\n" + + "
"}}; // Test for normal run of javadoc in which various ClassDocs and // serialized form should have properly nested definition list tags // enclosing comments, tags and deprecated information. private static final String[][] TEST_CMNT_DEPR = { - { "pkg1/package-summary.html", "
\n" + - "
Since:
\n" + - "
JDK1.0
\n" + - "
"}, - { "pkg1/C1.html", "
\n" + - "
Since:
\n" + - "
JDK1.0
\n" + - "
See Also:
\n" + - "
" + - "C2, \n" + - "" + - "Serialized Form
\n" + - "
"}, - { "pkg1/C1.html", "
\n" + - "
Since:
\n" + - "
1.4
\n" + - "
See Also:
\n" + - "
" + - "" + - "setUndecorated(boolean)
\n" + - "
"}, - { "pkg1/C1.html", "
\n" + - "
Parameters:
\n" + - "
title" + - " - the title
\n" + - "
test - boolean value" + - "
\n" + - "
Throws:
\n" + - "
java.lang.IllegalArgumentException - if the " + - "owner's\n" + - " GraphicsConfiguration is not from a screen " + - "device
\n" + - "
HeadlessException
\n" + - "
"}, - { "pkg1/C1.html", "
\n" + - "
Parameters:
\n" + - "
undecorated" + - " - true if no decorations are\n" + - " to be enabled;\n" + - " false " + - "if decorations are to be enabled.
\n" + - "
Since:" + - "
\n" + - "
1.4
\n" + - "
See Also:
\n" + - "
" + - "readObject()" + - "
\n" + - "
"}, - { "pkg1/C1.html", "
\n" + - "
Throws:
\n" + - "
java.io.IOException
\n" + - "
See Also:" + - "
\n" + - "
" + - "setUndecorated(boolean)
\n" + - "
"}, - { "pkg1/C2.html", "
\n" + - "
Parameters:" + - "
\n" + - "
set - boolean
\n" + - "
" + - "Since:
\n" + - "
1.4
\n" + - "
"}, - { "serialized-form.html", "
\n" + - "
Throws:" + - "
\n" + - "
" + - "java.io.IOException
\n" + - "
See Also:" + - "
\n" + - "
" + - "C1.setUndecorated(boolean)
\n" + - "
"}, + { "pkg1/package-summary.html", + "
\n" + + "
Since:
\n" + + "
JDK1.0
\n" + + "
"}, + { "pkg1/C1.html", + "
\n" + + "
Since:
\n" + + "
JDK1.0
\n" + + "
See Also:
\n" + + "
" + + "C2, \n" + + "" + + "Serialized Form
\n" + + "
"}, + { "pkg1/C1.html", + "
\n" + + "
Since:
\n" + + "
1.4
\n" + + "
See Also:
\n" + + "
" + + "setUndecorated(boolean)
\n" + + "
"}, + { "pkg1/C1.html", + "
\n" + + "
Parameters:
\n" + + "
title - the title
\n" + + "
test - boolean value" + + "
\n" + + "
Throws:
\n" + + "
java.lang.IllegalArgumentException - if the " + + "owner's\n" + + " GraphicsConfiguration is not from a screen " + + "device
\n" + + "
HeadlessException
\n" + + "
"}, + { "pkg1/C1.html", + "
\n" + + "
Parameters:
\n" + + "
undecorated" + + " - true if no decorations are\n" + + " to be enabled;\n" + + " false " + + "if decorations are to be enabled.
\n" + + "
Since:" + + "
\n" + + "
1.4
\n" + + "
See Also:
\n" + + "
" + + "readObject()" + + "
\n" + + "
"}, + { "pkg1/C1.html", + "
\n" + + "
Throws:
\n" + + "
java.io.IOException
\n" + + "
See Also:" + + "
\n" + + "
" + + "setUndecorated(boolean)
\n" + + "
"}, + { "pkg1/C2.html", + "
\n" + + "
Parameters:" + + "
\n" + + "
set - boolean
\n" + + "
" + + "Since:
\n" + + "
1.4
\n" + + "
"}, { "serialized-form.html", - "Deprecated." + - " As of JDK version 1.5, replaced by\n" + - " " + - "setUndecorated(boolean).\n" + - "
This field indicates whether the C1 is " + - "undecorated.
\n" + - " \n" + - "
\n" + - "
Since:
\n" + - "
1.4
\n" + - "
See Also:" + - "
\n" + - "
" + - "C1.setUndecorated(boolean)
\n" + - "
"}, + "
\n" + + "
Throws:" + + "
\n" + + "
" + + "java.io.IOException
\n" + + "
See Also:" + + "
\n" + + "
" + + "C1.setUndecorated(boolean)
\n" + + "
"}, { "serialized-form.html", - "Deprecated." + - " As of JDK version 1.5, replaced by\n" + - " " + - "setUndecorated(boolean).\n" + - "
Reads the object stream.
\n" + - "
\n" + - "
Throws:" + - "
\n" + - "
" + - "IOException
\n" + - "
java.io.IOException
\n" + - "
"}, + "Deprecated." + + " As of JDK version 1.5, replaced by\n" + + " " + + "setUndecorated(boolean).\n" + + "
This field indicates whether the C1 is " + + "undecorated.
\n" + + " \n" + + "
\n" + + "
Since:
\n" + + "
1.4
\n" + + "
See Also:" + + "
\n" + + "
" + + "C1.setUndecorated(boolean)
\n" + + "
"}, { "serialized-form.html", - "Deprecated." + - " \n" + - "
The name for this class.
"}}; + "Deprecated." + + " As of JDK version 1.5, replaced by\n" + + " " + + "setUndecorated(boolean).\n" + + "
Reads the object stream.
\n" + + "
\n" + + "
Throws:" + + "
\n" + + "
" + + "IOException
\n" + + "
java.io.IOException
\n" + + "
"}, + { "serialized-form.html", + "Deprecated." + + " \n" + + "
The name for this class.
"}}; // Test with -nodeprecated option. The ClassDocs should have properly nested // definition list tags enclosing comments and tags. The ClassDocs should not @@ -168,183 +175,210 @@ public class TestHtmlDefinitionListTag extends JavadocTester { // should display properly nested definition list tags for comments, tags // and deprecated information. private static final String[][] TEST_NODEPR = { - { "pkg1/package-summary.html", "
\n" + - "
Since:
\n" + - "
JDK1.0
\n" + - "
"}, - { "pkg1/C1.html", "
\n" + - "
Since:" + - "
\n" + - "
JDK1.0
\n" + - "
See Also:" + - "
\n" + - "
" + - "C2, \n" + - "" + - "Serialized Form
\n" + - "
"}, - { "pkg1/C1.html", "
\n" + - "
Parameters:" + - "
\n" + - "
title - the title
\n" + - "
" + - "test - boolean value
\n" + - "
Throws:" + - "
\n" + - "
java.lang.IllegalArgumentException" + - " - if the owner's\n" + - " GraphicsConfiguration" + - " is not from a screen device
\n" + - "
" + - "HeadlessException
\n" + - "
"}, - { "pkg1/C1.html", "
\n" + - "
Parameters:" + - "
\n" + - "
undecorated - true" + - " if no decorations are\n" + - " to be enabled;\n" + - " false if decorations are to be enabled." + - "
\n" + - "
Since:
\n" + - "
1.4
\n" + - "
See Also:
\n" + - "
" + - "readObject()
\n" + - "
"}, - { "pkg1/C1.html", "
\n" + - "
Throws:" + - "
\n" + - "
java.io.IOException
\n" + - "
" + - "See Also:
\n" + - "
" + - "setUndecorated(boolean)
\n" + - "
"}, - { "serialized-form.html", "
\n" + - "
Throws:" + - "
\n" + - "
" + - "java.io.IOException
\n" + - "
See Also:" + - "
\n" + - "
" + - "C1.setUndecorated(boolean)
\n" + - "
"}, + { "pkg1/package-summary.html", + "
\n" + + "
Since:
\n" + + "
JDK1.0
\n" + + "
"}, + { "pkg1/C1.html", + "
\n" + + "
Since:" + + "
\n" + + "
JDK1.0
\n" + + "
See Also:" + + "
\n" + + "
" + + "C2, \n" + + "" + + "Serialized Form
\n" + + "
"}, + { "pkg1/C1.html", + "
\n" + + "
Parameters:" + + "
\n" + + "
title - the title
\n" + + "
" + + "test - boolean value
\n" + + "
Throws:" + + "
\n" + + "
java.lang.IllegalArgumentException" + + " - if the owner's\n" + + " GraphicsConfiguration" + + " is not from a screen device
\n" + + "
" + + "HeadlessException
\n" + + "
"}, + { "pkg1/C1.html", + "
\n" + + "
Parameters:" + + "
\n" + + "
undecorated - true" + + " if no decorations are\n" + + " to be enabled;\n" + + " false if decorations are to be enabled." + + "
\n" + + "
Since:
\n" + + "
1.4
\n" + + "
See Also:
\n" + + "
" + + "readObject()
\n" + + "
"}, + { "pkg1/C1.html", + "
\n" + + "
Throws:" + + "
\n" + + "
java.io.IOException
\n" + + "
" + + "See Also:
\n" + + "
" + + "setUndecorated(boolean)
\n" + + "
"}, { "serialized-form.html", - "Deprecated." + - " As of JDK version 1.5, replaced by\n" + - " " + - "setUndecorated(boolean).\n" + - "
This field indicates whether the C1 is " + - "undecorated.
\n" + - " \n" + - "
\n" + - "
Since:
\n" + - "
1.4
\n" + - "
See Also:" + - "
\n" + - "
" + - "C1.setUndecorated(boolean)
\n" + - "
"}, + "
\n" + + "
Throws:" + + "
\n" + + "
" + + "java.io.IOException
\n" + + "
See Also:" + + "
\n" + + "
" + + "C1.setUndecorated(boolean)
\n" + + "
"}, { "serialized-form.html", - "Deprecated." + - " As of JDK version 1.5, replaced by\n" + - " " + - "setUndecorated(boolean).\n" + - "
Reads the object stream.
\n" + - "
\n" + - "
Throws:" + - "
\n" + - "
" + - "IOException
\n" + - "
java.io.IOException
\n" + - "
"}, + "Deprecated." + + " As of JDK version 1.5, replaced by\n" + + " " + + "setUndecorated(boolean).\n" + + "
This field indicates whether the C1 is " + + "undecorated.
\n" + + " \n" + + "
\n" + + "
Since:
\n" + + "
1.4
\n" + + "
See Also:" + + "
\n" + + "
" + + "C1.setUndecorated(boolean)
\n" + + "
"}, { "serialized-form.html", - "Deprecated." + - " \n" + - "
" + - "The name for this class.
"}}; + "Deprecated." + + " As of JDK version 1.5, replaced by\n" + + " " + + "setUndecorated(boolean).\n" + + "
Reads the object stream.
\n" + + "
\n" + + "
Throws:" + + "
\n" + + "
" + + "IOException
\n" + + "
java.io.IOException
\n" + + "
"}, + { "serialized-form.html", + "Deprecated." + + " \n" + + "
" + + "The name for this class.
"}}; // Test with -nocomment and -nodeprecated options. The ClassDocs whould // not display definition lists for any member details. private static final String[][] TEST_NOCMNT_NODEPR = { { "pkg1/C1.html", - "
public void readObject()\n" +
-                 "                throws java.io.IOException
\n" + - ""}, + "
public void readObject()\n" +
+                "                throws java.io.IOException
\n" + + ""}, { "pkg1/C2.html", "
public C2()
\n" + - ""}, + ""}, { "pkg1/C1.ModalExclusionType.html", "
public " +
-                 "static final C1.ModalExclusionType " +
-                 "APPLICATION_EXCLUDE
\n" + - ""}, + "static final C1.ModalExclusionType " + + "APPLICATION_EXCLUDE\n" + + ""}, { "serialized-form.html", "
boolean " +
-                 "undecorated
\n" + - "
" + - "Deprecated. As of JDK version 1.5, replaced by\n" + - " " + - "setUndecorated(boolean).
\n" + - ""}, + "undecorated\n" + + "
" + + "Deprecated. As of JDK version 1.5, replaced by\n" + + " " + + "setUndecorated(boolean).
\n" + + ""}, { "serialized-form.html", "" + - "Deprecated. As of JDK version" + - " 1.5, replaced by\n" + - " " + - "setUndecorated(boolean).\n" + - ""}}; + "Deprecated. As of JDK version" + + " 1.5, replaced by\n" + + " " + + "setUndecorated(boolean).\n" + + ""}}; // Test for valid HTML generation which should not comprise of empty // definition list tags. - private static final String[][] NEGATED_TEST = { - { "pkg1/package-summary.html", "
"}, - { "pkg1/package-summary.html", "
\n" + - "
"}, - { "pkg1/C1.html", "
"}, - { "pkg1/C1.html", "
\n" + - "
"}, - { "pkg1/C1.ModalExclusionType.html", "
"}, - { "pkg1/C1.ModalExclusionType.html", "
\n" + - "
"}, - { "pkg1/C2.html", "
"}, - { "pkg1/C2.html", "
\n" + - "
"}, - { "pkg1/C2.ModalType.html", "
"}, - { "pkg1/C2.ModalType.html", "
\n" + - "
"}, - { "pkg1/C3.html", "
"}, - { "pkg1/C3.html", "
\n" + - "
"}, - { "pkg1/C4.html", "
"}, - { "pkg1/C4.html", "
\n" + - "
"}, - { "pkg1/C5.html", "
"}, - { "pkg1/C5.html", "
\n" + - "
"}, - { "overview-tree.html", "
"}, - { "overview-tree.html", "
\n" + - "
"}, - { "serialized-form.html", "
"}, - { "serialized-form.html", "
\n" + - "
"}}; + private static final String[][] NEGATED_TEST_NO_C5 = { + { "pkg1/package-summary.html", + "
"}, + { "pkg1/package-summary.html", + "
\n" + + "
"}, + { "pkg1/C1.html", + "
"}, + { "pkg1/C1.html", + "
\n" + + "
"}, + { "pkg1/C1.ModalExclusionType.html", + "
"}, + { "pkg1/C1.ModalExclusionType.html", + "
\n" + + "
"}, + { "pkg1/C2.html", + "
"}, + { "pkg1/C2.html", + "
\n" + + "
"}, + { "pkg1/C2.ModalType.html", + "
"}, + { "pkg1/C2.ModalType.html", + "
\n" + + "
"}, + { "pkg1/C3.html", + "
"}, + { "pkg1/C3.html", + "
\n" + + "
"}, + { "pkg1/C4.html", + "
"}, + { "pkg1/C4.html", + "
\n" + + "
"}, + { "overview-tree.html", + "
"}, + { "overview-tree.html", + "
\n" + + "
"}, + { "serialized-form.html", + "
"}, + { "serialized-form.html", + "
\n" + + "
"}}; + private static final String[][] NEGATED_TEST_C5 = { + { "pkg1/C5.html", + "
"}, + { "pkg1/C5.html", + "
\n" + + "
"}}; private static final String[] ARGS1 = new String[] { - "-Xdoclint:none", "-d", OUTPUT_DIR, "-sourcepath", SRC_DIR, "pkg1"}; + "-Xdoclint:none", "-d", OUTPUT_DIR + "-1", "-sourcepath", SRC_DIR, "pkg1"}; private static final String[] ARGS2 = new String[] { - "-Xdoclint:none", "-d", OUTPUT_DIR, "-nocomment", "-sourcepath", + "-Xdoclint:none", "-d", OUTPUT_DIR + "-2", "-nocomment", "-sourcepath", SRC_DIR, "pkg1"}; private static final String[] ARGS3 = new String[] { - "-Xdoclint:none", "-d", OUTPUT_DIR, "-nodeprecated", "-sourcepath", + "-Xdoclint:none", "-d", OUTPUT_DIR + "-3", "-nodeprecated", "-sourcepath", SRC_DIR, "pkg1"}; private static final String[] ARGS4 = new String[] { - "-Xdoclint:none", "-d", OUTPUT_DIR, "-nocomment", "-nodeprecated", + "-Xdoclint:none", "-d", OUTPUT_DIR + "-4", "-nocomment", "-nodeprecated", "-sourcepath", SRC_DIR, "pkg1"}; /** @@ -353,14 +387,20 @@ public class TestHtmlDefinitionListTag extends JavadocTester { */ public static void main(String[] args) { TestHtmlDefinitionListTag tester = new TestHtmlDefinitionListTag(); - tester.run(ARGS1, TEST_ALL, NEGATED_TEST); - tester.run(ARGS1, TEST_CMNT_DEPR, NEGATED_TEST); - tester.run(ARGS2, TEST_ALL, NEGATED_TEST); - tester.run(ARGS2, NO_TEST, TEST_CMNT_DEPR); - tester.run(ARGS3, TEST_ALL, NEGATED_TEST); - tester.run(ARGS3, TEST_NODEPR, TEST_NOCMNT_NODEPR); - tester.run(ARGS4, TEST_ALL, NEGATED_TEST); - tester.run(ARGS4, TEST_NOCMNT_NODEPR, TEST_CMNT_DEPR); + tester.run(ARGS1, TEST_ALL, NEGATED_TEST_NO_C5); + tester.runTestsOnHTML(NO_TEST, NEGATED_TEST_C5); + tester.runTestsOnHTML(TEST_CMNT_DEPR, NO_TEST); + + tester.run(ARGS2, TEST_ALL, NEGATED_TEST_NO_C5); + tester.runTestsOnHTML(NO_TEST, NEGATED_TEST_C5); + tester.runTestsOnHTML(NO_TEST, TEST_CMNT_DEPR); + + tester.run(ARGS3, TEST_ALL, NEGATED_TEST_NO_C5); + tester.runTestsOnHTML(TEST_NODEPR, TEST_NOCMNT_NODEPR); + + tester.run(ARGS4, TEST_ALL, NEGATED_TEST_NO_C5); + tester.runTestsOnHTML(TEST_NOCMNT_NODEPR, TEST_CMNT_DEPR); + tester.printSummary(); } } diff --git a/langtools/test/com/sun/javadoc/testHtmlStrongTag/TestHtmlStrongTag.java b/langtools/test/com/sun/javadoc/testHtmlStrongTag/TestHtmlStrongTag.java index 87e243e1b3c..a29bf387fc3 100644 --- a/langtools/test/com/sun/javadoc/testHtmlStrongTag/TestHtmlStrongTag.java +++ b/langtools/test/com/sun/javadoc/testHtmlStrongTag/TestHtmlStrongTag.java @@ -47,16 +47,14 @@ public class TestHtmlStrongTag extends JavadocTester { private static final String[][] TEST2 = { { "pkg2/C2.html", "Comments:"}}; private static final String[][] NEGATED_TEST2 = { - { "pkg2/C2.html", "Method Summary"}, - { "pkg1/package-summary.html", - "Class Summary"}}; + { "pkg2/C2.html", "Method Summary"}}; private static final String[] ARGS1 = new String[] { - "-d", OUTPUT_DIR, "-sourcepath", SRC_DIR, "pkg1"}; + "-d", OUTPUT_DIR + "-1", "-sourcepath", SRC_DIR, "pkg1"}; private static final String[] ARGS2 = new String[] { - "-d", OUTPUT_DIR, "-sourcepath", SRC_DIR, "pkg2"}; + "-d", OUTPUT_DIR + "-2", "-sourcepath", SRC_DIR, "pkg2"}; /** * The entry point of the test. diff --git a/langtools/test/com/sun/javadoc/testHtmlTag/TestHtmlTag.java b/langtools/test/com/sun/javadoc/testHtmlTag/TestHtmlTag.java index 070fa1a7122..8990b2fc6ac 100644 --- a/langtools/test/com/sun/javadoc/testHtmlTag/TestHtmlTag.java +++ b/langtools/test/com/sun/javadoc/testHtmlTag/TestHtmlTag.java @@ -58,13 +58,13 @@ public class TestHtmlTag extends JavadocTester { private static final String[] ARGS1 = new String[] { - "-d", OUTPUT_DIR, "-sourcepath", SRC_DIR, "pkg1"}; + "-d", OUTPUT_DIR + "-1", "-sourcepath", SRC_DIR, "pkg1"}; private static final String[] ARGS2 = new String[] { - "-locale", "ja", "-d", OUTPUT_DIR, "-sourcepath", SRC_DIR, "pkg2"}; + "-locale", "ja", "-d", OUTPUT_DIR + "-2", "-sourcepath", SRC_DIR, "pkg2"}; private static final String[] ARGS3 = new String[] { - "-locale", "en_US", "-d", OUTPUT_DIR, "-sourcepath", SRC_DIR, "pkg1"}; + "-locale", "en_US", "-d", OUTPUT_DIR + "-3", "-sourcepath", SRC_DIR, "pkg1"}; /** * The entry point of the test. diff --git a/langtools/test/com/sun/javadoc/testLinkOption/TestLinkOption.java b/langtools/test/com/sun/javadoc/testLinkOption/TestLinkOption.java index f40dad5413e..b1ea09635c2 100644 --- a/langtools/test/com/sun/javadoc/testLinkOption/TestLinkOption.java +++ b/langtools/test/com/sun/javadoc/testLinkOption/TestLinkOption.java @@ -79,8 +79,8 @@ public class TestLinkOption extends JavadocTester { private static final String[][] TEST2 = { { "pkg2/C2.html", - "This is a link to Class C." } }; @@ -119,7 +119,6 @@ public class TestLinkOption extends JavadocTester { public static void main(String[] args) { TestLinkOption tester = new TestLinkOption(); tester.run(ARGS1, TEST1, NEGATED_TEST1); - tester.run(ARGS1, TEST1, NEGATED_TEST1); tester.run(ARGS2, TEST2, NO_TEST); tester.runJavadoc(createArguments(true)); // with trailing slash tester.runJavadoc(createArguments(false)); // without trailing slash diff --git a/langtools/test/com/sun/javadoc/testNotifications/TestNotifications.java b/langtools/test/com/sun/javadoc/testNotifications/TestNotifications.java index 613967b0948..ab0b9a0987d 100644 --- a/langtools/test/com/sun/javadoc/testNotifications/TestNotifications.java +++ b/langtools/test/com/sun/javadoc/testNotifications/TestNotifications.java @@ -67,7 +67,9 @@ public class TestNotifications extends JavadocTester { tester.run(ARGS, TEST, NO_TEST); // No need to notify that the destination must be created because // it already exists. + tester.setCheckOutputDirectoryCheck(DirectoryCheck.NONE); tester.run(ARGS, NO_TEST, NEGATED_TEST); + tester.setCheckOutputDirectoryCheck(DirectoryCheck.NO_HTML_FILES); //Make sure classname is not include in javadoc usage message. tester.run(ARGS2, NO_TEST, NEGATED_TEST2); tester.printSummary(); diff --git a/langtools/test/com/sun/javadoc/testSerializedFormDeprecationInfo/TestSerializedFormDeprecationInfo.java b/langtools/test/com/sun/javadoc/testSerializedFormDeprecationInfo/TestSerializedFormDeprecationInfo.java index d9ebb4ef911..20e28da635e 100644 --- a/langtools/test/com/sun/javadoc/testSerializedFormDeprecationInfo/TestSerializedFormDeprecationInfo.java +++ b/langtools/test/com/sun/javadoc/testSerializedFormDeprecationInfo/TestSerializedFormDeprecationInfo.java @@ -115,19 +115,19 @@ public class TestSerializedFormDeprecationInfo extends JavadocTester { private static final String[] ARGS1 = new String[] { - "-d", OUTPUT_DIR, "-sourcepath", SRC_DIR, "pkg1"}; + "-d", OUTPUT_DIR + "-1", "-sourcepath", SRC_DIR, "pkg1"}; private static final String[] ARGS2 = new String[] { - "-d", OUTPUT_DIR, "-nocomment", "-sourcepath", SRC_DIR, "pkg1"}; + "-d", OUTPUT_DIR + "-2", "-nocomment", "-sourcepath", SRC_DIR, "pkg1"}; private static final String[] ARGS3 = new String[] { - "-d", OUTPUT_DIR, "-nodeprecated", "-sourcepath", SRC_DIR, "pkg1"}; + "-d", OUTPUT_DIR + "-3", "-nodeprecated", "-sourcepath", SRC_DIR, "pkg1"}; private static final String[] ARGS4 = new String[] { - "-d", OUTPUT_DIR, "-nocomment", "-nodeprecated", "-sourcepath", + "-d", OUTPUT_DIR + "-4", "-nocomment", "-nodeprecated", "-sourcepath", SRC_DIR, "pkg1"}; /** diff --git a/langtools/test/com/sun/javadoc/testSinceTag/TestSinceTag.java b/langtools/test/com/sun/javadoc/testSinceTag/TestSinceTag.java index d8f768ce583..451cd30bf32 100644 --- a/langtools/test/com/sun/javadoc/testSinceTag/TestSinceTag.java +++ b/langtools/test/com/sun/javadoc/testSinceTag/TestSinceTag.java @@ -35,11 +35,11 @@ public class TestSinceTag extends JavadocTester { //Javadoc arguments. private static final String[] ARGS1 = new String[] { - "-d", OUTPUT_DIR, "-sourcepath", SRC_DIR, "pkg1" + "-d", OUTPUT_DIR + "-1", "-sourcepath", SRC_DIR, "pkg1" }; private static final String[] ARGS2 = new String[] { - "-d", OUTPUT_DIR, "-sourcepath", SRC_DIR, "-nosince", "pkg1" + "-d", OUTPUT_DIR + "-2", "-sourcepath", SRC_DIR, "-nosince", "pkg1" }; //Input for string search tests. diff --git a/langtools/test/com/sun/javadoc/testTypeParams/TestTypeParameters.java b/langtools/test/com/sun/javadoc/testTypeParams/TestTypeParameters.java index 8607b043e72..d07899011ca 100644 --- a/langtools/test/com/sun/javadoc/testTypeParams/TestTypeParameters.java +++ b/langtools/test/com/sun/javadoc/testTypeParams/TestTypeParameters.java @@ -39,11 +39,11 @@ public class TestTypeParameters extends JavadocTester { //Javadoc arguments. private static final String[] ARGS1 = new String[]{ - "-d", OUTPUT_DIR, "-use", "-sourcepath", SRC_DIR, + "-d", OUTPUT_DIR + "-1", "-use", "-sourcepath", SRC_DIR, "pkg" }; private static final String[] ARGS2 = new String[]{ - "-d", OUTPUT_DIR, "-linksource", "-sourcepath", SRC_DIR, + "-d", OUTPUT_DIR + "-2", "-linksource", "-sourcepath", SRC_DIR, "pkg" }; diff --git a/langtools/test/com/sun/javadoc/testWarnings/TestWarnings.java b/langtools/test/com/sun/javadoc/testWarnings/TestWarnings.java index 37884dd25da..c2c13ab736a 100644 --- a/langtools/test/com/sun/javadoc/testWarnings/TestWarnings.java +++ b/langtools/test/com/sun/javadoc/testWarnings/TestWarnings.java @@ -40,11 +40,11 @@ public class TestWarnings extends JavadocTester { //Javadoc arguments. private static final String[] ARGS = new String[] { - "-Xdoclint:none", "-d", OUTPUT_DIR, "-sourcepath", SRC_DIR, "pkg" + "-Xdoclint:none", "-d", OUTPUT_DIR + "-1", "-sourcepath", SRC_DIR, "pkg" }; private static final String[] ARGS2 = new String[] { - "-Xdoclint:none", "-d", OUTPUT_DIR, "-private", "-sourcepath", SRC_DIR, + "-Xdoclint:none", "-d", OUTPUT_DIR + "-2", "-private", "-sourcepath", SRC_DIR, "pkg" }; @@ -78,7 +78,6 @@ public class TestWarnings extends JavadocTester { public static void main(String[] args) { TestWarnings tester = new TestWarnings(); tester.run(ARGS, TEST, NEGATED_TEST); - tester.run(ARGS, TEST, NEGATED_TEST); tester.run(ARGS2, TEST2, NO_TEST); tester.printSummary(); }