test/langtools/jdk/javadoc/doclet/testOverriddenMethods/TestOverrideMethods.java
changeset 48654 36f58bd6269f
parent 48257 125716343184
child 49139 771616d26ca1
equal deleted inserted replaced
48653:89111a0e6355 48654:36f58bd6269f
     1 /*
     1 /*
     2  * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
    71 
    71 
    72         checkExit(Exit.OK);
    72         checkExit(Exit.OK);
    73 
    73 
    74         checkOrder("pkg5/Classes.C.html",
    74         checkOrder("pkg5/Classes.C.html",
    75                 // Check properties
    75                 // Check properties
    76                 "Properties declared in class&nbsp;pkg5.<a href=\"../pkg5/Classes.P.html",
    76                 "Properties declared in class&nbsp;pkg5.<a href=\"Classes.P.html",
    77                 "Classes.P",
    77                 "Classes.P",
    78                 "../pkg5/Classes.P.html#rateProperty\">rate",
    78                 "Classes.P.html#rateProperty\">rate",
    79 
    79 
    80                 // Check nested classes
    80                 // Check nested classes
    81                 "Nested classes/interfaces declared in class&nbsp;pkg5.",
    81                 "Nested classes/interfaces declared in class&nbsp;pkg5.",
    82                 "Classes.P",
    82                 "Classes.P",
    83                 "./pkg5/Classes.P.PN.html",
    83                 "Classes.P.PN.html",
    84                 "Classes.P.PN.html",
    84                 "Classes.P.PN.html",
    85                 "type parameter in Classes.P.PN\">K",
    85                 "type parameter in Classes.P.PN\">K",
    86                 "type parameter in Classes.P.PN",
    86                 "type parameter in Classes.P.PN",
    87                 "V",
    87                 "V",
    88 
    88 
    89                 // Check fields
    89                 // Check fields
    90                 "Fields declared in class&nbsp;pkg5.<a href=\"../pkg5/Classes.P.html",
    90                 "Fields declared in class&nbsp;pkg5.<a href=\"Classes.P.html",
    91                 "Classes.P",
    91                 "Classes.P",
    92                 "../pkg5/Classes.P.html#field0\">field0",
    92                 "Classes.P.html#field0\">field0",
    93 
    93 
    94                 // Check method summary
    94                 // Check method summary
    95                 "Method Summary",
    95                 "Method Summary",
    96                 "void",
    96                 "void",
    97                 "../pkg5/Classes.C.html#m1--\">m1",
    97                 "#m1--\">m1",
    98                 "A modified method",
    98                 "A modified method",
    99 
    99 
   100                 "void",
   100                 "void",
   101                 "../pkg5/Classes.C.html#m4-java.lang.String-java.lang.String-\">m4",
   101                 "#m4-java.lang.String-java.lang.String-\">m4",
   102                 "java.lang.String&nbsp;k,",
   102                 "java.lang.String&nbsp;k,",
   103                 "java.lang.String",
   103                 "java.lang.String",
   104                 "&nbsp;v)",
   104                 "&nbsp;v)",
   105 
   105 
   106                 // Check footnotes
   106                 // Check footnotes
   107                 "Methods declared in class&nbsp;pkg5.<a href=\"../pkg5/Classes.GP.html",
   107                 "Methods declared in class&nbsp;pkg5.<a href=\"Classes.GP.html",
   108                 "Classes.GP",
   108                 "Classes.GP",
   109                 "../pkg5/Classes.GP.html#m0--\">m0",
   109                 "Classes.GP.html#m0--\">m0",
   110 
   110 
   111                 // Check method details for override
   111                 // Check method details for override
   112                 "overrideSpecifyLabel",
   112                 "overrideSpecifyLabel",
   113                 "Overrides:",
   113                 "Overrides:",
   114                 "../pkg5/Classes.GP.html#m7--\">m7",
   114                 "Classes.GP.html#m7--\">m7",
   115                 "in class",
   115                 "in class",
   116                 "../pkg5/Classes.GP.html",
   116                 "Classes.GP.html",
   117                 "Classes.GP"
   117                 "Classes.GP"
   118         );
   118         );
   119 
   119 
   120         checkOrder("pkg5/Classes.C.html",
   120         checkOrder("pkg5/Classes.C.html",
   121                 // Check footnotes 2
   121                 // Check footnotes 2
   122                 "Methods declared in class&nbsp;pkg5.",
   122                 "Methods declared in class&nbsp;pkg5.",
   123                 "../pkg5/Classes.P.html#getRate--\">getRate",
   123                 "Classes.P.html#getRate--\">getRate",
   124                 "../pkg5/Classes.P.html#m2--\">m2",
   124                 "Classes.P.html#m2--\">m2",
   125                 "../pkg5/Classes.P.html#m3--\">m3",
   125                 "Classes.P.html#m3--\">m3",
   126                 "../pkg5/Classes.P.html#m4-K-V-\">m4",
   126                 "Classes.P.html#m4-K-V-\">m4",
   127                 "../pkg5/Classes.P.html#rateProperty--\">rateProperty",
   127                 "Classes.P.html#rateProperty--\">rateProperty",
   128                 "../pkg5/Classes.P.html#setRate-double-\">setRate",
   128                 "Classes.P.html#setRate-double-\">setRate",
   129 
   129 
   130                 // Check @link
   130                 // Check @link
   131                 "A test of links to the methods in this class. <p>\n",
   131                 "A test of links to the methods in this class. <p>\n",
   132                 "../pkg5/Classes.GP.html#m0--",
   132                 "Classes.GP.html#m0--",
   133                 "Classes.GP.m0()",
   133                 "Classes.GP.m0()",
   134                 "../pkg5/Classes.C.html#m1--",
   134                 "#m1--",
   135                 "m1()",
   135                 "m1()",
   136                 "../pkg5/Classes.P.html#m2--",
   136                 "Classes.P.html#m2--",
   137                 "Classes.P.m2()",
   137                 "Classes.P.m2()",
   138                 "../pkg5/Classes.P.html#m3--",
   138                 "Classes.P.html#m3--",
   139                 "Classes.P.m3()",
   139                 "Classes.P.m3()",
   140                 "m4(java.lang.String,java.lang.String)",
   140                 "m4(java.lang.String,java.lang.String)",
   141                 "../pkg5/Classes.P.html#m5--",
   141                 "Classes.P.html#m5--",
   142                 "Classes.P.m5()",
   142                 "Classes.P.m5()",
   143                 "../pkg5/Classes.C.html#m6--",
   143                 "#m6--",
   144                 "m6()",
   144                 "m6()",
   145                 "../pkg5/Classes.C.html#m7--",
   145                 "#m7--",
   146                 "m7()",
   146                 "m7()",
   147                 "End of links",
   147                 "End of links",
   148 
   148 
   149                 // Check @see
   149                 // Check @see
   150                 "See Also:",
   150                 "See Also:",
   151                 "../pkg5/Classes.GP.html#m0--",
   151                 "Classes.GP.html#m0--",
   152                 "Classes.GP.m0()",
   152                 "Classes.GP.m0()",
   153                 "../pkg5/Classes.C.html#m1--",
   153                 "#m1--",
   154                 "m1()",
   154                 "m1()",
   155                 "../pkg5/Classes.P.html#m2--",
   155                 "Classes.P.html#m2--",
   156                 "Classes.P.m2()",
   156                 "Classes.P.m2()",
   157                 "../pkg5/Classes.P.html#m3--",
   157                 "Classes.P.html#m3--",
   158                 "Classes.P.m3()",
   158                 "Classes.P.m3()",
   159                 "../pkg5/Classes.C.html#m4-java.lang.String-java.lang.String-",
   159                 "#m4-java.lang.String-java.lang.String-",
   160                 "m4(String k, String v)",
   160                 "m4(String k, String v)",
   161                 "../pkg5/Classes.P.html#m5--\"><code>Classes.P.m5()",
   161                 "Classes.P.html#m5--\"><code>Classes.P.m5()",
   162                 "../pkg5/Classes.C.html#m6--\"><code>m6()",
   162                 "#m6--\"><code>m6()",
   163                 "../pkg5/Classes.C.html#m7--\"><code>m7()"
   163                 "#m7--\"><code>m7()"
   164         );
   164         );
   165 
   165 
   166         // Tests for interfaces
   166         // Tests for interfaces
   167 
   167 
   168         // Make sure the static methods in the super interface
   168         // Make sure the static methods in the super interface
   170         checkOutput("pkg5/Interfaces.D.html", false,
   170         checkOutput("pkg5/Interfaces.D.html", false,
   171             "msd", "msn");
   171             "msd", "msn");
   172 
   172 
   173         checkOrder("pkg5/Interfaces.D.html",
   173         checkOrder("pkg5/Interfaces.D.html",
   174                 "Start of links <p>",
   174                 "Start of links <p>",
   175                 "../pkg5/Interfaces.A.html#m0--\"><code>Interfaces.A.m0()",
   175                 "Interfaces.A.html#m0--\"><code>Interfaces.A.m0()",
   176                 "../pkg5/Interfaces.A.html#m1--\"><code>Interfaces.A.m1()",
   176                 "Interfaces.A.html#m1--\"><code>Interfaces.A.m1()",
   177                 "../pkg5/Interfaces.A.html#m2--\"><code>Interfaces.A.m2()",
   177                 "Interfaces.A.html#m2--\"><code>Interfaces.A.m2()",
   178                 "../pkg5/Interfaces.A.html#m3--\"><code>Interfaces.A.m3()",
   178                 "Interfaces.A.html#m3--\"><code>Interfaces.A.m3()",
   179                 "../pkg5/Interfaces.D.html#m--\"><code>m()",
   179                 "#m--\"><code>m()",
   180                 "../pkg5/Interfaces.D.html#n--\"><code>n()",
   180                 "#n--\"><code>n()",
   181                 "../pkg5/Interfaces.C.html#o--\"><code>Interfaces.C.o()",
   181                 "Interfaces.C.html#o--\"><code>Interfaces.C.o()",
   182                 "End of links",
   182                 "End of links",
   183 
   183 
   184                 // Check @see links
   184                 // Check @see links
   185                 "See Also:",
   185                 "See Also:",
   186                 "../pkg5/Interfaces.A.html#m0--\"><code>Interfaces.A.m0()",
   186                 "Interfaces.A.html#m0--\"><code>Interfaces.A.m0()",
   187                 "../pkg5/Interfaces.A.html#m1--\"><code>Interfaces.A.m1()",
   187                 "Interfaces.A.html#m1--\"><code>Interfaces.A.m1()",
   188                 "../pkg5/Interfaces.A.html#m2--\"><code>Interfaces.A.m2()",
   188                 "Interfaces.A.html#m2--\"><code>Interfaces.A.m2()",
   189                 "../pkg5/Interfaces.A.html#m3--\"><code>Interfaces.A.m3()",
   189                 "Interfaces.A.html#m3--\"><code>Interfaces.A.m3()",
   190                 "../pkg5/Interfaces.D.html#m--\"><code>m()",
   190                 "#m--\"><code>m()",
   191                 "../pkg5/Interfaces.D.html#n--\"><code>n()",
   191                 "#n--\"><code>n()",
   192                 "../pkg5/Interfaces.C.html#o--\"><code>Interfaces.C.o()",
   192                 "Interfaces.C.html#o--\"><code>Interfaces.C.o()",
   193 
   193 
   194                 // Check properties
   194                 // Check properties
   195                 "Properties declared in interface&nbsp;pkg5.<a href=\"../pkg5/Interfaces.A.html\" "
   195                 "Properties declared in interface&nbsp;pkg5.<a href=\"Interfaces.A.html\" "
   196                 + "title=\"interface in pkg5\">Interfaces.A</a>",
   196                 + "title=\"interface in pkg5\">Interfaces.A</a>",
   197 
   197 
   198                 // Check nested classes
   198                 // Check nested classes
   199                 "Nested classes/interfaces declared in interface&nbsp;pkg5.",
   199                 "Nested classes/interfaces declared in interface&nbsp;pkg5.",
   200                 "Interfaces.A",
   200                 "Interfaces.A",
   201                 "../pkg5/Interfaces.A.AA.html",
   201                 "Interfaces.A.AA.html",
   202                 "Interfaces.A.AA",
   202                 "Interfaces.A.AA",
   203 
   203 
   204                 // Check Fields
   204                 // Check Fields
   205                 "Fields declared in interface&nbsp;pkg5.<a href=\"../pkg5/Interfaces.A.html",
   205                 "Fields declared in interface&nbsp;pkg5.<a href=\"Interfaces.A.html",
   206                 "../pkg5/Interfaces.A.html#f",
   206                 "Interfaces.A.html#f",
   207                 "../pkg5/Interfaces.A.html#QUOTE\">QUOTE",
   207                 "Interfaces.A.html#QUOTE\">QUOTE",
   208                 "../pkg5/Interfaces.A.html#rate\">rate",
   208                 "Interfaces.A.html#rate\">rate",
   209 
   209 
   210                 // Check Method Summary
   210                 // Check Method Summary
   211                 "Method Summary",
   211                 "Method Summary",
   212                 "../pkg5/Interfaces.D.html#m--\">m",
   212                 "#m--\">m",
   213                 "../pkg5/Interfaces.D.html#n--\">n",
   213                 "#n--\">n",
   214 
   214 
   215                 // Check footnotes
   215                 // Check footnotes
   216                 "Methods declared in interface&nbsp;pkg5.<a href=\"../pkg5/Interfaces.A.html",
   216                 "Methods declared in interface&nbsp;pkg5.<a href=\"Interfaces.A.html",
   217                 "../pkg5/Interfaces.A.html#getRate--\">getRate",
   217                 "Interfaces.A.html#getRate--\">getRate",
   218                 "../pkg5/Interfaces.A.html#rateProperty--\">rateProperty",
   218                 "Interfaces.A.html#rateProperty--\">rateProperty",
   219                 "../pkg5/Interfaces.A.html#setRate-double-",
   219                 "Interfaces.A.html#setRate-double-",
   220                 "Methods declared in interface&nbsp;pkg5.<a href=\"../pkg5/Interfaces.B.html",
   220                 "Methods declared in interface&nbsp;pkg5.<a href=\"Interfaces.B.html",
   221                 "../pkg5/Interfaces.B.html#m1--\">m1",
   221                 "Interfaces.B.html#m1--\">m1",
   222                 "../pkg5/Interfaces.B.html#m3--\">m3",
   222                 "Interfaces.B.html#m3--\">m3",
   223                 "Methods declared in interface&nbsp;pkg5.<a href=\"../pkg5/Interfaces.C.html",
   223                 "Methods declared in interface&nbsp;pkg5.<a href=\"Interfaces.C.html",
   224                 "<a href=\"../pkg5/Interfaces.C.html#o--\">o</a>"
   224                 "<a href=\"Interfaces.C.html#o--\">o</a>"
   225         );
   225         );
   226 
   226 
   227         // Test synthetic values and valuesof of an enum.
   227         // Test synthetic values and valuesof of an enum.
   228         checkOrder("index-all.html",
   228         checkOrder("index-all.html",
   229                 "<h2 class=\"title\">M</h2>",
   229                 "<h2 class=\"title\">M</h2>",