test/langtools/jdk/javadoc/doclet/testOverriddenMethods/TestOverrideMethods.java
changeset 49139 771616d26ca1
parent 48654 36f58bd6269f
child 49879 601277b1d582
--- a/test/langtools/jdk/javadoc/doclet/testOverriddenMethods/TestOverrideMethods.java	Tue Mar 06 17:43:21 2018 +0100
+++ b/test/langtools/jdk/javadoc/doclet/testOverriddenMethods/TestOverrideMethods.java	Tue Mar 06 10:45:47 2018 -0800
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 8157000 8192850
+ * @bug 8157000 8192850 8182765
  * @summary  test the behavior of --override-methods option
  * @library  ../lib
  * @modules jdk.javadoc/jdk.javadoc.internal.tool
@@ -94,11 +94,11 @@
                 // Check method summary
                 "Method Summary",
                 "void",
-                "#m1--\">m1",
+                "#m1()\">m1",
                 "A modified method",
 
                 "void",
-                "#m4-java.lang.String-java.lang.String-\">m4",
+                "#m4(java.lang.String,java.lang.String)\">m4",
                 "java.lang.String k,",
                 "java.lang.String",
                 " v)",
@@ -106,12 +106,12 @@
                 // Check footnotes
                 "Methods declared in class&nbsp;pkg5.<a href=\"Classes.GP.html",
                 "Classes.GP",
-                "Classes.GP.html#m0--\">m0",
+                "Classes.GP.html#m0()\">m0",
 
                 // Check method details for override
                 "overrideSpecifyLabel",
                 "Overrides:",
-                "Classes.GP.html#m7--\">m7",
+                "Classes.GP.html#m7()\">m7",
                 "in class",
                 "Classes.GP.html",
                 "Classes.GP"
@@ -120,47 +120,47 @@
         checkOrder("pkg5/Classes.C.html",
                 // Check footnotes 2
                 "Methods declared in class&nbsp;pkg5.",
-                "Classes.P.html#getRate--\">getRate",
-                "Classes.P.html#m2--\">m2",
-                "Classes.P.html#m3--\">m3",
-                "Classes.P.html#m4-K-V-\">m4",
-                "Classes.P.html#rateProperty--\">rateProperty",
-                "Classes.P.html#setRate-double-\">setRate",
+                "Classes.P.html#getRate()\">getRate",
+                "Classes.P.html#m2()\">m2",
+                "Classes.P.html#m3()\">m3",
+                "Classes.P.html#m4(K,V)\">m4",
+                "Classes.P.html#rateProperty()\">rateProperty",
+                "Classes.P.html#setRate(double)\">setRate",
 
                 // Check @link
                 "A test of links to the methods in this class. <p>\n",
-                "Classes.GP.html#m0--",
+                "Classes.GP.html#m0()",
                 "Classes.GP.m0()",
-                "#m1--",
+                "#m1()",
                 "m1()",
-                "Classes.P.html#m2--",
+                "Classes.P.html#m2()",
                 "Classes.P.m2()",
-                "Classes.P.html#m3--",
+                "Classes.P.html#m3()",
                 "Classes.P.m3()",
                 "m4(java.lang.String,java.lang.String)",
-                "Classes.P.html#m5--",
+                "Classes.P.html#m5()",
                 "Classes.P.m5()",
-                "#m6--",
+                "#m6()",
                 "m6()",
-                "#m7--",
+                "#m7()",
                 "m7()",
                 "End of links",
 
                 // Check @see
                 "See Also:",
-                "Classes.GP.html#m0--",
+                "Classes.GP.html#m0()",
                 "Classes.GP.m0()",
-                "#m1--",
+                "#m1()",
                 "m1()",
-                "Classes.P.html#m2--",
+                "Classes.P.html#m2()",
                 "Classes.P.m2()",
-                "Classes.P.html#m3--",
+                "Classes.P.html#m3()",
                 "Classes.P.m3()",
-                "#m4-java.lang.String-java.lang.String-",
+                "#m4(java.lang.String,java.lang.String)",
                 "m4(String k, String v)",
-                "Classes.P.html#m5--\"><code>Classes.P.m5()",
-                "#m6--\"><code>m6()",
-                "#m7--\"><code>m7()"
+                "Classes.P.html#m5()\"><code>Classes.P.m5()",
+                "#m6()\"><code>m6()",
+                "#m7()\"><code>m7()"
         );
 
         // Tests for interfaces
@@ -172,24 +172,24 @@
 
         checkOrder("pkg5/Interfaces.D.html",
                 "Start of links <p>",
-                "Interfaces.A.html#m0--\"><code>Interfaces.A.m0()",
-                "Interfaces.A.html#m1--\"><code>Interfaces.A.m1()",
-                "Interfaces.A.html#m2--\"><code>Interfaces.A.m2()",
-                "Interfaces.A.html#m3--\"><code>Interfaces.A.m3()",
-                "#m--\"><code>m()",
-                "#n--\"><code>n()",
-                "Interfaces.C.html#o--\"><code>Interfaces.C.o()",
+                "Interfaces.A.html#m0()\"><code>Interfaces.A.m0()",
+                "Interfaces.A.html#m1()\"><code>Interfaces.A.m1()",
+                "Interfaces.A.html#m2()\"><code>Interfaces.A.m2()",
+                "Interfaces.A.html#m3()\"><code>Interfaces.A.m3()",
+                "#m()\"><code>m()",
+                "#n()\"><code>n()",
+                "Interfaces.C.html#o()\"><code>Interfaces.C.o()",
                 "End of links",
 
                 // Check @see links
                 "See Also:",
-                "Interfaces.A.html#m0--\"><code>Interfaces.A.m0()",
-                "Interfaces.A.html#m1--\"><code>Interfaces.A.m1()",
-                "Interfaces.A.html#m2--\"><code>Interfaces.A.m2()",
-                "Interfaces.A.html#m3--\"><code>Interfaces.A.m3()",
-                "#m--\"><code>m()",
-                "#n--\"><code>n()",
-                "Interfaces.C.html#o--\"><code>Interfaces.C.o()",
+                "Interfaces.A.html#m0()\"><code>Interfaces.A.m0()",
+                "Interfaces.A.html#m1()\"><code>Interfaces.A.m1()",
+                "Interfaces.A.html#m2()\"><code>Interfaces.A.m2()",
+                "Interfaces.A.html#m3()\"><code>Interfaces.A.m3()",
+                "#m()\"><code>m()",
+                "#n()\"><code>n()",
+                "Interfaces.C.html#o()\"><code>Interfaces.C.o()",
 
                 // Check properties
                 "Properties declared in interface&nbsp;pkg5.<a href=\"Interfaces.A.html\" "
@@ -209,24 +209,128 @@
 
                 // Check Method Summary
                 "Method Summary",
-                "#m--\">m",
-                "#n--\">n",
+                "#m()\">m",
+                "#n()\">n",
 
                 // Check footnotes
                 "Methods declared in interface&nbsp;pkg5.<a href=\"Interfaces.A.html",
+                "Interfaces.A.html#getRate()\">getRate",
+                "Interfaces.A.html#rateProperty()\">rateProperty",
+                "Interfaces.A.html#setRate(double)",
+                "Methods declared in interface&nbsp;pkg5.<a href=\"Interfaces.B.html",
+                "Interfaces.B.html#m1()\">m1",
+                "Interfaces.B.html#m3()\">m3",
+                "Methods declared in interface&nbsp;pkg5.<a href=\"Interfaces.C.html",
+                "<a href=\"Interfaces.C.html#o()\">o</a>"
+        );
+
+        // Test synthetic values and valuesof of an enum.
+        checkOrder("index-all.html",
+                "<h2 class=\"title\">M</h2>",
+                "<a href=\"pkg5/Interfaces.C.html#m()\">m()",
+                "<a href=\"pkg5/Interfaces.D.html#m()\">m()</a>",
+                "<a href=\"pkg5/Classes.GP.html#m0()\">m0()",
+                "<a href=\"pkg5/Interfaces.A.html#m0()\">m0()</a>",
+                "<a href=\"pkg5/Classes.C.html#m1()\">m1()</a>",
+                "<a href=\"pkg5/Classes.P.html#m1()\">m1()</a>",
+                "<a href=\"pkg5/Interfaces.A.html#m1()\">m1()</a>",
+                "<a href=\"pkg5/Interfaces.B.html#m1()\">m1()</a>",
+                "<a href=\"pkg5/Classes.P.html#m2()\">m2()</a>",
+                "<a href=\"pkg5/Interfaces.A.html#m2()\">m2()</a>",
+                "<a href=\"pkg5/Classes.P.html#m3()\">m3()</a>",
+                "<a href=\"pkg5/Interfaces.A.html#m3()\">m3()</a>",
+                "<a href=\"pkg5/Interfaces.B.html#m3()\">m3()</a>",
+                "<a href=\"pkg5/Classes.C.html#m4(java.lang.String,java.lang.String)\">m4(String, String)</a>",
+                "<a href=\"pkg5/Classes.P.html#m4(K,V)\">m4(K, V)</a>",
+                "<a href=\"pkg5/Classes.P.html#m5()\">m5()</a>",
+                "<a href=\"pkg5/Classes.C.html#m6()\">m6()</a>",
+                "<a href=\"pkg5/Classes.P.html#m6()\">m6()</a>",
+                "<a href=\"pkg5/Classes.C.html#m7()\">m7()</a>",
+                "<a href=\"pkg5/Classes.GP.html#m7()\">m7()</a>",
+                "Returns the enum constant of this type with the specified name.",
+                "Returns an array containing the constants of this enum type, in\n" +
+                        "the order they are declared."
+        );
+    }
+
+    @Test
+    void testSummary_html4() {
+        javadoc("-d", "out-summary-html4",
+                "-html4",
+                "-sourcepath", testSrc,
+                "-javafx",
+                "--override-methods=summary",
+                "pkg5");
+
+        checkExit(Exit.OK);
+
+        checkOrder("pkg5/Classes.C.html",
+                "#m1--\">m1",
+                "#m4-java.lang.String-java.lang.String-\">m4",
+                "Classes.GP.html#m0--\">m0",
+                "Classes.GP.html#m7--\">m7"
+        );
+
+        checkOrder("pkg5/Classes.C.html",
+                // Check footnotes 2
+                "Classes.P.html#getRate--\">getRate",
+                "Classes.P.html#m2--\">m2",
+                "Classes.P.html#m3--\">m3",
+                "Classes.P.html#m4-K-V-\">m4",
+                "Classes.P.html#rateProperty--\">rateProperty",
+                "Classes.P.html#setRate-double-\">setRate",
+
+                // Check @link
+                "Classes.GP.html#m0--",
+                "#m1--",
+                "Classes.P.html#m2--",
+                "Classes.P.html#m3--",
+                "Classes.P.html#m5--",
+                "#m6--",
+                "#m7--",
+
+                // Check @see
+                "Classes.GP.html#m0--",
+                "#m1--",
+                "Classes.P.html#m2--",
+                "Classes.P.html#m3--",
+                "#m4-java.lang.String-java.lang.String-",
+                "Classes.P.html#m5--\"><code>Classes.P.m5()",
+                "#m6--\"><code>m6()",
+                "#m7--\"><code>m7()"
+        );
+
+        // Tests for interfaces
+
+        // Make sure the static methods in the super interface
+        // do not make it to this interface
+        checkOrder("pkg5/Interfaces.D.html",
+                "Interfaces.A.html#m0--\"><code>Interfaces.A.m0()",
+                "Interfaces.A.html#m1--\"><code>Interfaces.A.m1()",
+                "Interfaces.A.html#m2--\"><code>Interfaces.A.m2()",
+                "Interfaces.A.html#m3--\"><code>Interfaces.A.m3()",
+                "#m--\"><code>m()",
+                "#n--\"><code>n()",
+                "Interfaces.C.html#o--\"><code>Interfaces.C.o()",
+                "Interfaces.A.html#m0--\"><code>Interfaces.A.m0()",
+                "Interfaces.A.html#m1--\"><code>Interfaces.A.m1()",
+                "Interfaces.A.html#m2--\"><code>Interfaces.A.m2()",
+                "Interfaces.A.html#m3--\"><code>Interfaces.A.m3()",
+                "#m--\"><code>m()",
+                "#n--\"><code>n()",
+                "Interfaces.C.html#o--\"><code>Interfaces.C.o()",
+                "#m--\">m",
+                "#n--\">n",
                 "Interfaces.A.html#getRate--\">getRate",
                 "Interfaces.A.html#rateProperty--\">rateProperty",
                 "Interfaces.A.html#setRate-double-",
-                "Methods declared in interface&nbsp;pkg5.<a href=\"Interfaces.B.html",
                 "Interfaces.B.html#m1--\">m1",
                 "Interfaces.B.html#m3--\">m3",
-                "Methods declared in interface&nbsp;pkg5.<a href=\"Interfaces.C.html",
                 "<a href=\"Interfaces.C.html#o--\">o</a>"
         );
 
         // Test synthetic values and valuesof of an enum.
         checkOrder("index-all.html",
-                "<h2 class=\"title\">M</h2>",
                 "<a href=\"pkg5/Interfaces.C.html#m--\">m()",
                 "<a href=\"pkg5/Interfaces.D.html#m--\">m()</a>",
                 "<a href=\"pkg5/Classes.GP.html#m0--\">m0()",
@@ -246,10 +350,7 @@
                 "<a href=\"pkg5/Classes.C.html#m6--\">m6()</a>",
                 "<a href=\"pkg5/Classes.P.html#m6--\">m6()</a>",
                 "<a href=\"pkg5/Classes.C.html#m7--\">m7()</a>",
-                "<a href=\"pkg5/Classes.GP.html#m7--\">m7()</a>",
-                "Returns the enum constant of this type with the specified name.",
-                "Returns an array containing the constants of this enum type, in\n" +
-                        "the order they are declared."
+                "<a href=\"pkg5/Classes.GP.html#m7--\">m7()</a>"
         );
     }
 }