test/langtools/jdk/javadoc/doclet/testProperty/TestProperty.java
changeset 48654 36f58bd6269f
parent 47450 d3e20c816f60
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.
    45                 "-sourcepath", testSrc,
    45                 "-sourcepath", testSrc,
    46                 "pkg");
    46                 "pkg");
    47         checkExit(Exit.OK);
    47         checkExit(Exit.OK);
    48 
    48 
    49         checkOutput("pkg/MyClass.html", true,
    49         checkOutput("pkg/MyClass.html", true,
    50                 "<pre>public final&nbsp;<a href=\"../pkg/ObjectProperty.html\" "
    50                 "<pre>public final&nbsp;<a href=\"ObjectProperty.html\" "
    51                 + "title=\"class in pkg\">ObjectProperty</a>"
    51                 + "title=\"class in pkg\">ObjectProperty</a>"
    52                 + "&lt;<a href=\"../pkg/MyObj.html\" "
    52                 + "&lt;<a href=\"MyObj.html\" "
    53                 + "title=\"class in pkg\">MyObj</a>&gt; goodProperty</pre>\n"
    53                 + "title=\"class in pkg\">MyObj</a>&gt; goodProperty</pre>\n"
    54                 + "<div class=\"block\">This is an Object property where the "
    54                 + "<div class=\"block\">This is an Object property where the "
    55                 + "Object is a single Object.</div>\n"
    55                 + "Object is a single Object.</div>\n"
    56                 + "<dl>\n"
    56                 + "<dl>\n"
    57                 + "<dt><span class=\"seeLabel\">See Also:</span></dt>\n"
    57                 + "<dt><span class=\"seeLabel\">See Also:</span></dt>\n"
    58                 + "<dd><a href=\"../pkg/MyClass.html#getGood--\"><code>getGood()</code></a>, \n"
    58                 + "<dd><a href=\"#getGood--\"><code>getGood()</code></a>, \n"
    59                 + "<a href=\"../pkg/MyClass.html#setGood-pkg.MyObj-\">"
    59                 + "<a href=\"#setGood-pkg.MyObj-\">"
    60                 + "<code>setGood(MyObj)</code></a></dd>\n"
    60                 + "<code>setGood(MyObj)</code></a></dd>\n"
    61                 + "</dl>",
    61                 + "</dl>",
    62 
    62 
    63                 "<pre>public final&nbsp;<a href=\"../pkg/ObjectProperty.html\" "
    63                 "<pre>public final&nbsp;<a href=\"ObjectProperty.html\" "
    64                 + "title=\"class in pkg\">ObjectProperty</a>"
    64                 + "title=\"class in pkg\">ObjectProperty</a>"
    65                 + "&lt;<a href=\"../pkg/MyObj.html\" "
    65                 + "&lt;<a href=\"MyObj.html\" "
    66                 + "title=\"class in pkg\">MyObj</a>[]&gt; badProperty</pre>\n"
    66                 + "title=\"class in pkg\">MyObj</a>[]&gt; badProperty</pre>\n"
    67                 + "<div class=\"block\">This is an Object property where the "
    67                 + "<div class=\"block\">This is an Object property where the "
    68                 + "Object is an array.</div>\n"
    68                 + "Object is an array.</div>\n"
    69                 + "<dl>\n"
    69                 + "<dl>\n"
    70                 + "<dt><span class=\"seeLabel\">See Also:</span></dt>\n"
    70                 + "<dt><span class=\"seeLabel\">See Also:</span></dt>\n"
    71                 + "<dd><a href=\"../pkg/MyClass.html#getBad--\"><code>getBad()</code></a>, \n"
    71                 + "<dd><a href=\"#getBad--\"><code>getBad()</code></a>, \n"
    72                 + "<a href=\"../pkg/MyClass.html#setBad-pkg.MyObj:A-\">"
    72                 + "<a href=\"#setBad-pkg.MyObj:A-\">"
    73                 + "<code>setBad(MyObj[])</code></a></dd>\n"
    73                 + "<code>setBad(MyObj[])</code></a></dd>\n"
    74                 + "</dl>",
    74                 + "</dl>",
    75 
    75 
    76                 // id should not be used in the property table
    76                 // id should not be used in the property table
    77                 "<tr class=\"altColor\">\n"
    77                 "<tr class=\"altColor\">\n"
    78                 + "<td class=\"colFirst\"><code><a href=\"../pkg/ObjectProperty.html\" "
    78                 + "<td class=\"colFirst\"><code><a href=\"ObjectProperty.html\" "
    79                 + "title=\"class in pkg\">ObjectProperty</a>&lt;<a href=\"../pkg/MyObj.html\" "
    79                 + "title=\"class in pkg\">ObjectProperty</a>&lt;<a href=\"MyObj.html\" "
    80                 + "title=\"class in pkg\">MyObj</a>[]&gt;</code></td>\n"
    80                 + "title=\"class in pkg\">MyObj</a>[]&gt;</code></td>\n"
    81                 + "<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\">"
    81                 + "<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\">"
    82                 + "<a href=\"../pkg/MyClass.html#badProperty\">bad</a></span></code></th>",
    82                 + "<a href=\"#badProperty\">bad</a></span></code></th>",
    83 
    83 
    84                 // id should be used in the method table
    84                 // id should be used in the method table
    85                 "<tr id=\"i0\" class=\"altColor\">\n"
    85                 "<tr id=\"i0\" class=\"altColor\">\n"
    86                 + "<td class=\"colFirst\"><code><a href=\"../pkg/ObjectProperty.html\" "
    86                 + "<td class=\"colFirst\"><code><a href=\"ObjectProperty.html\" "
    87                 + "title=\"class in pkg\">ObjectProperty</a>&lt;<a href=\"../pkg/MyObj.html\" "
    87                 + "title=\"class in pkg\">ObjectProperty</a>&lt;<a href=\"MyObj.html\" "
    88                 + "title=\"class in pkg\">MyObj</a>[]&gt;</code></td>\n"
    88                 + "title=\"class in pkg\">MyObj</a>[]&gt;</code></td>\n"
    89                 + "<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\">"
    89                 + "<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\">"
    90                 + "<a href=\"../pkg/MyClass.html#badProperty--\">badProperty</a></span>()</code></th>"
    90                 + "<a href=\"#badProperty--\">badProperty</a></span>()</code></th>"
    91         );
    91         );
    92 
    92 
    93         checkOutput("pkg/MyClassT.html", true,
    93         checkOutput("pkg/MyClassT.html", true,
    94                 "<pre>public final&nbsp;<a href=\"../pkg/ObjectProperty.html\" "
    94                 "<pre>public final&nbsp;<a href=\"ObjectProperty.html\" "
    95                 + "title=\"class in pkg\">ObjectProperty</a>"
    95                 + "title=\"class in pkg\">ObjectProperty</a>"
    96                 + "&lt;java.util.List&lt;<a href=\"../pkg/MyClassT.html\" "
    96                 + "&lt;java.util.List&lt;<a href=\"MyClassT.html\" "
    97                 + "title=\"type parameter in MyClassT\">T</a>&gt;&gt; "
    97                 + "title=\"type parameter in MyClassT\">T</a>&gt;&gt; "
    98                 + "listProperty</pre>\n"
    98                 + "listProperty</pre>\n"
    99                 + "<div class=\"block\">This is an Object property where the "
    99                 + "<div class=\"block\">This is an Object property where the "
   100                 + "Object is a single <code>List&lt;T&gt;</code>.</div>\n"
   100                 + "Object is a single <code>List&lt;T&gt;</code>.</div>\n"
   101                 + "<dl>\n"
   101                 + "<dl>\n"
   102                 + "<dt><span class=\"seeLabel\">See Also:</span></dt>\n"
   102                 + "<dt><span class=\"seeLabel\">See Also:</span></dt>\n"
   103                 + "<dd><a href=\"../pkg/MyClassT.html#getList--\">"
   103                 + "<dd><a href=\"#getList--\">"
   104                 + "<code>getList()</code></a>, \n"
   104                 + "<code>getList()</code></a>, \n"
   105                 + "<a href=\"../pkg/MyClassT.html#setList-java.util.List-\">"
   105                 + "<a href=\"#setList-java.util.List-\">"
   106                 + "<code>setList(List)</code></a></dd>\n"
   106                 + "<code>setList(List)</code></a></dd>\n"
   107                 + "</dl>"
   107                 + "</dl>"
   108         );
   108         );
   109     }
   109     }
   110 }
   110 }