--- a/test/langtools/jdk/javadoc/doclet/testOrdering/TestOrdering.java Tue Mar 06 17:43:21 2018 +0100
+++ b/test/langtools/jdk/javadoc/doclet/testOrdering/TestOrdering.java Tue Mar 06 10:45:47 2018 -0800
@@ -23,7 +23,7 @@
/*
* @test
- * @bug 8039410 8042601 8042829 8049393 8050031 8155061 8155995 8167967 8169813
+ * @bug 8039410 8042601 8042829 8049393 8050031 8155061 8155995 8167967 8169813 8182765
* @summary test to determine if members are ordered correctly
* @library ../lib/
* @modules jdk.javadoc/jdk.javadoc.internal.tool
@@ -93,9 +93,9 @@
String contents = tester.readFile(usePage);
// check constructors
tester.checking("constructors");
- int idx1 = contents.indexOf("C.html#C-UsedInC");
- int idx2 = contents.indexOf("C.html#C-UsedInC-int");
- int idx3 = contents.indexOf("C.html#C-UsedInC-java.lang.String");
+ int idx1 = contents.indexOf("C.html#%3Cinit%3E(UsedInC");
+ int idx2 = contents.indexOf("C.html#%3Cinit%3E(UsedInC,int");
+ int idx3 = contents.indexOf("C.html#%3Cinit%3E(UsedInC,java.lang.String");
if (idx1 == -1 || idx2 == -1 || idx3 == -1) {
tester.failed("ctor strings not found");
} else if (idx1 > idx2 || idx2 > idx3 || idx1 > idx3) {
@@ -106,8 +106,8 @@
// check methods
tester.checking("methods");
- idx1 = contents.indexOf("C.html#ymethod-int");
- idx2 = contents.indexOf("C.html#ymethod-java.lang.String");
+ idx1 = contents.indexOf("C.html#ymethod(int");
+ idx2 = contents.indexOf("C.html#ymethod(java.lang.String");
if (idx1 == -1 || idx2 == -1) {
tester.failed("#ymethod strings not found");
} else if (idx1 > idx2) {
@@ -135,42 +135,42 @@
checkClassUseOrdering("pkg1/class-use/UsedClass.html");
tester.checkOrder("pkg1/class-use/UsedClass.html",
- "../MethodOrder.html#m--",
- "../MethodOrder.html#m-byte:A-",
- "../MethodOrder.html#m-double-",
- "../MethodOrder.html#m-double-double-",
- "../MethodOrder.html#m-double-java.lang.Double-",
- "../MethodOrder.html#m-int-",
- "../MethodOrder.html#m-int-int-",
- "../MethodOrder.html#m-int-java.lang.Integer-",
- "../MethodOrder.html#m-long-",
- "../MethodOrder.html#m-long-long-",
- "../MethodOrder.html#m-long-java.lang.Long-",
- "../MethodOrder.html#m-long-java.lang.Long...-",
- "../MethodOrder.html#m-java.lang.Double-",
- "../MethodOrder.html#m-java.lang.Double-double-",
- "../MethodOrder.html#m-java.lang.Double-java.lang.Double-",
- "../MethodOrder.html#m-java.lang.Integer-",
- "../MethodOrder.html#m-java.lang.Integer-int-",
- "../MethodOrder.html#m-java.lang.Integer-java.lang.Integer-",
- "../MethodOrder.html#m-java.lang.Object:A-",
- "../MethodOrder.html#m-java.util.ArrayList-",
- "../MethodOrder.html#m-java.util.Collection-",
- "../MethodOrder.html#m-java.util.List-");
+ "../MethodOrder.html#m()",
+ "../MethodOrder.html#m(byte%5B%5D)",
+ "../MethodOrder.html#m(double)",
+ "../MethodOrder.html#m(double,double)",
+ "../MethodOrder.html#m(double,java.lang.Double)",
+ "../MethodOrder.html#m(int)",
+ "../MethodOrder.html#m(int,int)",
+ "../MethodOrder.html#m(int,java.lang.Integer)",
+ "../MethodOrder.html#m(long)",
+ "../MethodOrder.html#m(long,long)",
+ "../MethodOrder.html#m(long,java.lang.Long)",
+ "../MethodOrder.html#m(long,java.lang.Long...)",
+ "../MethodOrder.html#m(java.lang.Double)",
+ "../MethodOrder.html#m(java.lang.Double,double)",
+ "../MethodOrder.html#m(java.lang.Double,java.lang.Double)",
+ "../MethodOrder.html#m(java.lang.Integer)",
+ "../MethodOrder.html#m(java.lang.Integer,int)",
+ "../MethodOrder.html#m(java.lang.Integer,java.lang.Integer)",
+ "../MethodOrder.html#m(java.lang.Object%5B%5D)",
+ "../MethodOrder.html#m(java.util.ArrayList)",
+ "../MethodOrder.html#m(java.util.Collection)",
+ "../MethodOrder.html#m(java.util.List)");
tester.checkOrder("pkg1/class-use/UsedClass.html",
- "../MethodOrder.html#tpm-pkg1.UsedClass-",
- "../MethodOrder.html#tpm-pkg1.UsedClass-pkg1.UsedClass-",
- "../MethodOrder.html#tpm-pkg1.UsedClass-pkg1.UsedClass:A-",
- "../MethodOrder.html#tpm-pkg1.UsedClass-java.lang.String-");
+ "../MethodOrder.html#tpm(pkg1.UsedClass)",
+ "../MethodOrder.html#tpm(pkg1.UsedClass,pkg1.UsedClass)",
+ "../MethodOrder.html#tpm(pkg1.UsedClass,pkg1.UsedClass%5B%5D)",
+ "../MethodOrder.html#tpm(pkg1.UsedClass,java.lang.String)");
tester.checkOrder("pkg1/class-use/UsedClass.html",
- "../A.html#A-pkg1.UsedClass-",
- "../B.A.html#A-pkg1.UsedClass-",
- "../B.html#B-pkg1.UsedClass-",
- "../A.C.html#C-pkg1.UsedClass-java.lang.Object:A-",
- "../A.C.html#C-pkg1.UsedClass-java.util.Collection-",
- "../A.C.html#C-pkg1.UsedClass-java.util.List-");
+ "../A.html#%3Cinit%3E(pkg1.UsedClass)",
+ "../B.A.html#%3Cinit%3E(pkg1.UsedClass)",
+ "../B.html#%3Cinit%3E(pkg1.UsedClass)",
+ "../A.C.html#%3Cinit%3E(pkg1.UsedClass,java.lang.Object%5B%5D)",
+ "../A.C.html#%3Cinit%3E(pkg1.UsedClass,java.util.Collection)",
+ "../A.C.html#%3Cinit%3E(pkg1.UsedClass,java.util.List)");
tester.checkOrder("pkg1/ImplementsOrdering.html",
"<dd><code>close</code> in interface <code>java.lang.AutoCloseable</code></dd>",
@@ -213,7 +213,7 @@
void checkClassUseOrdering(String usePage) {
checkClassUseOrdering(usePage, "C#ITERATION#.html#zfield");
checkClassUseOrdering(usePage, "C#ITERATION#.html#fieldInC#ITERATION#");
- checkClassUseOrdering(usePage, "C#ITERATION#.html#zmethod-pkg1.UsedClass");
+ checkClassUseOrdering(usePage, "C#ITERATION#.html#zmethod(pkg1.UsedClass");
checkClassUseOrdering(usePage, "C#ITERATION#.html#methodInC#ITERATION#");
}
@@ -346,17 +346,17 @@
};
static String expectedMethodOrdering[] = {
- "Add.html#add--",
- "Add.html#add-double-",
- "Add.html#add-double-byte-",
- "Add.html#add-double-double-",
- "Add.html#add-double-java.lang.Double-",
- "Add.html#add-float-",
- "Add.html#add-float-int-",
- "Add.html#add-int-",
- "Add.html#add-int-float-",
- "Add.html#add-java.lang.Double-",
- "Add.html#add-java.lang.Integer-"
+ "Add.html#add()",
+ "Add.html#add(double)",
+ "Add.html#add(double,byte)",
+ "Add.html#add(double,double)",
+ "Add.html#add(double,java.lang.Double)",
+ "Add.html#add(float)",
+ "Add.html#add(float,int)",
+ "Add.html#add(int)",
+ "Add.html#add(int,float)",
+ "Add.html#add(java.lang.Double)",
+ "Add.html#add(java.lang.Integer)"
};
static String expectedPackageOrdering[] = {
@@ -593,10 +593,10 @@
tester.checkOrder("pkg5/AnnoOptionalTest.html",
"<h3>Optional Element Summary</h3>",
- "<a href=\"#four--\">four</a>",
- "<a href=\"#one--\">one</a>",
- "<a href=\"#three--\">three</a>",
- "<a href=\"#two--\">two</a>",
+ "<a href=\"#four()\">four</a>",
+ "<a href=\"#one()\">one</a>",
+ "<a href=\"#three()\">three</a>",
+ "<a href=\"#two()\">two</a>",
"<h3>Element Detail</h3>",
"<h4>one</h4>",
"<h4>two</h4>",
@@ -605,10 +605,10 @@
tester.checkOrder("pkg5/AnnoRequiredTest.html",
"<h3>Required Element Summary</h3>",
- "<a href=\"#four--\">four</a>",
- "<a href=\"#one--\">one</a>",
- "<a href=\"#three--\">three</a>",
- "<a href=\"#two--\">two</a>",
+ "<a href=\"#four()\">four</a>",
+ "<a href=\"#one()\">one</a>",
+ "<a href=\"#three()\">three</a>",
+ "<a href=\"#two()\">two</a>",
"<h3>Element Detail</h3>",
"<h4>one</h4>",
"<h4>two</h4>",
@@ -617,15 +617,15 @@
tester.checkOrder("pkg5/CtorTest.html",
"<h3>Constructor Summary</h3>",
- "<a href=\"#CtorTest-int-\"",
- "<a href=\"#CtorTest-int-int-\"",
- "<a href=\"#CtorTest-int-int-int-\"",
- "<a href=\"#CtorTest-int-int-int-int-\"",
+ "<a href=\"#%3Cinit%3E(int)\"",
+ "<a href=\"#%3Cinit%3E(int,int)\"",
+ "<a href=\"#%3Cinit%3E(int,int,int)\"",
+ "<a href=\"#%3Cinit%3E(int,int,int,int)\"",
"<h3>Constructor Detail</h3>",
- "<a name=\"CtorTest-int-int-int-int-\">",
- "<a name=\"CtorTest-int-int-int-\">",
- "<a name=\"CtorTest-int-int-\">",
- "<a name=\"CtorTest-int-\">");
+ "<a id=\"<init>(int,int,int,int)\">",
+ "<a id=\"<init>(int,int,int)\">",
+ "<a id=\"<init>(int,int)\">",
+ "<a id=\"<init>(int)\">");
tester.checkOrder("pkg5/EnumTest.html",
"<h3>Enum Constant Summary</h3>",
@@ -653,10 +653,10 @@
tester.checkOrder("pkg5/IntfTest.html",
"<h3>Method Summary</h3>",
- "<a href=\"#four--\">four</a>",
- "<a href=\"#one--\">one</a>",
- "<a href=\"#three--\">three</a>",
- "<a href=\"#two--\">two</a>",
+ "<a href=\"#four()\">four</a>",
+ "<a href=\"#one()\">one</a>",
+ "<a href=\"#three()\">three</a>",
+ "<a href=\"#two()\">two</a>",
"<h3>Method Detail</h3>",
"<h4>one</h4>",
"<h4>two</h4>",
@@ -665,10 +665,10 @@
tester.checkOrder("pkg5/MethodTest.html",
"<h3>Method Summary</h3>",
- "<a href=\"#four--\">four</a>",
- "<a href=\"#one--\">one</a>",
- "<a href=\"#three--\">three</a>",
- "<a href=\"#two--\">two</a>",
+ "<a href=\"#four()\">four</a>",
+ "<a href=\"#one()\">one</a>",
+ "<a href=\"#three()\">three</a>",
+ "<a href=\"#two()\">two</a>",
"<h3>Method Detail</h3>",
"<h4>one</h4>",
"<h4>two</h4>",
@@ -686,6 +686,25 @@
"<h4>twoProperty</h4>",
"<h4>threeProperty</h4>",
"<h4>fourProperty</h4>");
+
+ tester.javadoc("-d", "out-5-html4",
+ "-html4",
+ "-javafx",
+ "-sourcepath", tester.testSrc(new File(".").getPath()),
+ "pkg5"
+ );
+
+ tester.checkExit(Exit.OK);
+
+ tester.checkOrder("pkg5/CtorTest.html",
+ "<a href=\"#CtorTest-int-\"",
+ "<a href=\"#CtorTest-int-int-\"",
+ "<a href=\"#CtorTest-int-int-int-\"",
+ "<a href=\"#CtorTest-int-int-int-int-\"",
+ "<a name=\"CtorTest-int-int-int-int-\">",
+ "<a name=\"CtorTest-int-int-int-\">",
+ "<a name=\"CtorTest-int-int-\">",
+ "<a name=\"CtorTest-int-\">");
}
}
}