test/langtools/jdk/javadoc/doclet/testJavaFX/TestJavaFX.java
changeset 49139 771616d26ca1
parent 48654 36f58bd6269f
child 49879 601277b1d582
equal deleted inserted replaced
49138:67912cbf784a 49139:771616d26ca1
    22  */
    22  */
    23 
    23 
    24 /*
    24 /*
    25  * @test
    25  * @test
    26  * @bug 7112427 8012295 8025633 8026567 8061305 8081854 8150130 8162363
    26  * @bug 7112427 8012295 8025633 8026567 8061305 8081854 8150130 8162363
    27  *      8167967 8172528 8175200 8178830 8182257 8186332
    27  *      8167967 8172528 8175200 8178830 8182257 8186332 8182765
    28  * @summary Test of the JavaFX doclet features.
    28  * @summary Test of the JavaFX doclet features.
    29  * @author jvalenta
    29  * @author jvalenta
    30  * @library ../lib
    30  * @library ../lib
    31  * @modules jdk.javadoc/jdk.javadoc.internal.tool
    31  * @modules jdk.javadoc/jdk.javadoc.internal.tool
    32  * @build JavadocTester
    32  * @build JavadocTester
    49                 "pkg1");
    49                 "pkg1");
    50         checkExit(Exit.OK);
    50         checkExit(Exit.OK);
    51 
    51 
    52         checkOutput("pkg1/C.html", true,
    52         checkOutput("pkg1/C.html", true,
    53                 "<dt><span class=\"seeLabel\">See Also:</span></dt>\n"
    53                 "<dt><span class=\"seeLabel\">See Also:</span></dt>\n"
    54                 + "<dd><a href=\"#getRate--\"><code>getRate()</code></a>, \n"
    54                 + "<dd><a href=\"#getRate()\"><code>getRate()</code></a>, \n"
    55                 + "<a href=\"#setRate-double-\">"
    55                 + "<a href=\"#setRate(double)\"><code>setRate(double)</code></a></dd>",
    56                 + "<code>setRate(double)</code></a></dd>",
       
    57                 "<pre>public final&nbsp;void&nbsp;setRate&#8203;(double&nbsp;value)</pre>\n"
    56                 "<pre>public final&nbsp;void&nbsp;setRate&#8203;(double&nbsp;value)</pre>\n"
    58                 + "<div class=\"block\">Sets the value of the property rate.</div>\n"
    57                 + "<div class=\"block\">Sets the value of the property rate.</div>\n"
    59                 + "<dl>\n"
    58                 + "<dl>\n"
    60                 + "<dt><span class=\"simpleTagLabel\">Property description:</span></dt>",
    59                 + "<dt><span class=\"simpleTagLabel\">Property description:</span></dt>",
    61                 "<pre>public final&nbsp;double&nbsp;getRate()</pre>\n"
    60                 "<pre>public final&nbsp;double&nbsp;getRate()</pre>\n"
    75                 + "<dd>JavaFX 8.0</dd>",
    74                 + "<dd>JavaFX 8.0</dd>",
    76                 "<p>Sets the value of the property <code>Property</code>",
    75                 "<p>Sets the value of the property <code>Property</code>",
    77                 "<p>Gets the value of the property <code>Property</code>",
    76                 "<p>Gets the value of the property <code>Property</code>",
    78                 "<span class=\"simpleTagLabel\">Property description:</span>",
    77                 "<span class=\"simpleTagLabel\">Property description:</span>",
    79                 "<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\">"
    78                 "<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\">"
    80                 + "<a href=\"#setTestMethodProperty--\">"
    79                 + "<a href=\"#setTestMethodProperty()\">"
    81                 + "setTestMethodProperty</a></span>()</code></th>",
    80                 + "setTestMethodProperty</a></span>()</code></th>",
    82                 "<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\">"
    81                 "<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\">"
    83                 + "<a href=\"#pausedProperty\">paused</a></span></code></th>\n"
    82                 + "<a href=\"#pausedProperty\">paused</a></span></code></th>\n"
    84                 + "<td class=\"colLast\">\n"
    83                 + "<td class=\"colLast\">\n"
    85                 + "<div class=\"block\">Defines if paused.</div>",
    84                 + "<div class=\"block\">Defines if paused.</div>",
   133                 + "<dt><span class=\"simpleTagLabel\">Default value:</span></dt>\n"
   132                 + "<dt><span class=\"simpleTagLabel\">Default value:</span></dt>\n"
   134                 + "<dd>11</dd>\n"
   133                 + "<dd>11</dd>\n"
   135                 + "<dt><span class=\"simpleTagLabel\">Since:</span></dt>\n"
   134                 + "<dt><span class=\"simpleTagLabel\">Since:</span></dt>\n"
   136                 + "<dd>JavaFX 8.0</dd>",
   135                 + "<dd>JavaFX 8.0</dd>",
   137                 "<h3>Property Summary</h3>\n"
   136                 "<h3>Property Summary</h3>\n"
   138                 + "<table class=\"memberSummary\" summary=\"Property Summary table, listing properties, and an explanation\">\n"
   137                 + "<table class=\"memberSummary\">\n"
   139                 + "<caption><span>Properties</span><span class=\"tabEnd\">&nbsp;</span></caption>",
   138                 + "<caption><span>Properties</span><span class=\"tabEnd\">&nbsp;</span></caption>",
   140                 "<tr class=\"altColor\">\n"
   139                 "<tr class=\"altColor\">\n"
   141                 + "<td class=\"colFirst\"><code><a href=\"C.BooleanProperty.html\" title=\"class in pkg1\">C.BooleanProperty</a></code></td>\n",
   140                 + "<td class=\"colFirst\"><code><a href=\"C.BooleanProperty.html\" title=\"class in pkg1\">C.BooleanProperty</a></code></td>\n",
   142                 "<tr class=\"rowColor\">\n"
   141                 "<tr class=\"rowColor\">\n"
   143                 + "<td class=\"colFirst\"><code><a href=\"C.DoubleProperty.html\" title=\"class in pkg1\">C.DoubleProperty</a></code></td>\n");
   142                 + "<td class=\"colFirst\"><code><a href=\"C.DoubleProperty.html\" title=\"class in pkg1\">C.DoubleProperty</a></code></td>\n");
   166                     + "<code><a href=\"C.html#pausedProperty\">"
   165                     + "<code><a href=\"C.html#pausedProperty\">"
   167                     + "paused</a>, <a href=\"C.html#rateProperty\">rate</a></code></li>");
   166                     + "paused</a>, <a href=\"C.html#rateProperty\">rate</a></code></li>");
   168 
   167 
   169         checkOutput("pkg1/D.html", false, "shouldNotAppear");
   168         checkOutput("pkg1/D.html", false, "shouldNotAppear");
   170     }
   169     }
       
   170 
       
   171     @Test
       
   172     void test1_html4() {
       
   173         javadoc("-d", "out1-html4",
       
   174                 "-html4",
       
   175                 "-sourcepath", testSrc,
       
   176                 "-javafx",
       
   177                 "-package",
       
   178                 "pkg1");
       
   179         checkExit(Exit.OK);
       
   180 
       
   181         checkOutput("pkg1/C.html", true,
       
   182                 "<dt><span class=\"seeLabel\">See Also:</span></dt>\n"
       
   183                 + "<dd><a href=\"#getRate--\"><code>getRate()</code></a>, \n"
       
   184                 + "<a href=\"#setRate-double-\">"
       
   185                 + "<code>setRate(double)</code></a></dd>",
       
   186                 "<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\">"
       
   187                 + "<a href=\"#setTestMethodProperty--\">"
       
   188                 + "setTestMethodProperty</a></span>()</code></th>",
       
   189                 "<h3>Property Summary</h3>\n"
       
   190                 + "<table class=\"memberSummary\" summary=\"Property Summary table, listing properties, and an explanation\">\n"
       
   191                 + "<caption><span>Properties</span><span class=\"tabEnd\">&nbsp;</span></caption>");
       
   192     }
       
   193 
   171     /*
   194     /*
   172      * Test with -javafx option enabled, to ensure property getters and setters
   195      * Test with -javafx option enabled, to ensure property getters and setters
   173      * are treated correctly.
   196      * are treated correctly.
   174      */
   197      */
   175     @Test
   198     @Test
   180                 "-package",
   203                 "-package",
   181                 "pkg2");
   204                 "pkg2");
   182         checkExit(Exit.OK);
   205         checkExit(Exit.OK);
   183         checkOutput("pkg2/Test.html", true,
   206         checkOutput("pkg2/Test.html", true,
   184                 "<h3>Property Detail</h3>\n"
   207                 "<h3>Property Detail</h3>\n"
   185                 + "<a name=\"betaProperty\">\n"
   208                 + "<a id=\"betaProperty\">\n"
   186                 + "<!--   -->\n"
   209                 + "<!--   -->\n"
   187                 + "</a>\n"
   210                 + "</a>\n"
   188                 + "<ul class=\"blockList\">\n"
   211                 + "<ul class=\"blockList\">\n"
   189                 + "<li class=\"blockList\">\n"
   212                 + "<li class=\"blockList\">\n"
   190                 + "<h4>beta</h4>\n"
   213                 + "<h4>beta</h4>\n"
   191                 + "<pre>public&nbsp;java.lang.Object betaProperty</pre>\n"
   214                 + "<pre>public&nbsp;java.lang.Object betaProperty</pre>\n"
   192                 + "</li>\n"
   215                 + "</li>\n"
   193                 + "</ul>\n"
   216                 + "</ul>\n"
   194                 + "<a name=\"gammaProperty\">\n"
   217                 + "<a id=\"gammaProperty\">\n"
   195                 + "<!--   -->\n"
   218                 + "<!--   -->\n"
   196                 + "</a>\n"
   219                 + "</a>\n"
   197                 + "<ul class=\"blockList\">\n"
   220                 + "<ul class=\"blockList\">\n"
   198                 + "<li class=\"blockList\">\n"
   221                 + "<li class=\"blockList\">\n"
   199                 + "<h4>gamma</h4>\n"
   222                 + "<h4>gamma</h4>\n"
   200                 + "<pre>public final&nbsp;java.util.List&lt;java.lang.String&gt; gammaProperty</pre>\n"
   223                 + "<pre>public final&nbsp;java.util.List&lt;java.lang.String&gt; gammaProperty</pre>\n"
   201                 + "</li>\n"
   224                 + "</li>\n"
   202                 + "</ul>\n"
   225                 + "</ul>\n"
   203                 + "<a name=\"deltaProperty\">\n"
   226                 + "<a id=\"deltaProperty\">\n"
   204                 + "<!--   -->\n"
   227                 + "<!--   -->\n"
   205                 + "</a>\n"
   228                 + "</a>\n"
   206                 + "<ul class=\"blockListLast\">\n"
   229                 + "<ul class=\"blockListLast\">\n"
   207                 + "<li class=\"blockList\">\n"
   230                 + "<li class=\"blockList\">\n"
   208                 + "<h4>delta</h4>\n"
   231                 + "<h4>delta</h4>\n"
   211                 + "</li>\n"
   234                 + "</li>\n"
   212                 + "</ul>\n"
   235                 + "</ul>\n"
   213                 + "</li>\n"
   236                 + "</li>\n"
   214                 + "</ul>",
   237                 + "</ul>",
   215                 "<h3>Property Summary</h3>\n"
   238                 "<h3>Property Summary</h3>\n"
   216                 + "<table class=\"memberSummary\" summary=\"Property Summary table, listing properties, and an explanation\">\n"
   239                 + "<table class=\"memberSummary\">\n"
   217                 + "<caption><span>Properties</span><span class=\"tabEnd\">&nbsp;</span></caption>");
   240                 + "<caption><span>Properties</span><span class=\"tabEnd\">&nbsp;</span></caption>");
   218 
   241 
   219         checkOutput("pkg2/Test.html", false,
   242         checkOutput("pkg2/Test.html", false,
   220                 "<h3>Property Summary</h3>\n"
   243                 "<h3>Property Summary</h3>\n"
   221                 + "<table class=\"memberSummary\" summary=\"Property Summary table, listing properties, and an explanation\">\n"
   244                 + "<table class=\"memberSummary\" summary=\"Property Summary table, listing properties, and an explanation\">\n"
   224                 + "</span><span class=\"tabEnd\">&nbsp;</span></span><span id=\"t4\" class=\"tableTab\"><span>"
   247                 + "</span><span class=\"tabEnd\">&nbsp;</span></span><span id=\"t4\" class=\"tableTab\"><span>"
   225                 + "<a href=\"javascript:show(8);\">Concrete Methods</a></span><span class=\"tabEnd\">&nbsp;</span></span>"
   248                 + "<a href=\"javascript:show(8);\">Concrete Methods</a></span><span class=\"tabEnd\">&nbsp;</span></span>"
   226                 + "</caption>");
   249                 + "</caption>");
   227     }
   250     }
   228 
   251 
       
   252     @Test
       
   253     void test2_html4() {
       
   254         javadoc("-d", "out2a-html4",
       
   255                 "-html4",
       
   256                 "-sourcepath", testSrc,
       
   257                 "-javafx",
       
   258                 "-package",
       
   259                 "pkg2");
       
   260         checkExit(Exit.OK);
       
   261         checkOutput("pkg2/Test.html", true,
       
   262                 "<h3>Property Detail</h3>\n"
       
   263                 + "<a name=\"betaProperty\">\n"
       
   264                 + "<!--   -->\n"
       
   265                 + "</a>\n"
       
   266                 + "<ul class=\"blockList\">\n"
       
   267                 + "<li class=\"blockList\">\n"
       
   268                 + "<h4>beta</h4>\n"
       
   269                 + "<pre>public&nbsp;java.lang.Object betaProperty</pre>\n"
       
   270                 + "</li>\n"
       
   271                 + "</ul>\n"
       
   272                 + "<a name=\"gammaProperty\">\n"
       
   273                 + "<!--   -->\n"
       
   274                 + "</a>\n"
       
   275                 + "<ul class=\"blockList\">\n"
       
   276                 + "<li class=\"blockList\">\n"
       
   277                 + "<h4>gamma</h4>\n"
       
   278                 + "<pre>public final&nbsp;java.util.List&lt;java.lang.String&gt; gammaProperty</pre>\n"
       
   279                 + "</li>\n"
       
   280                 + "</ul>\n"
       
   281                 + "<a name=\"deltaProperty\">\n"
       
   282                 + "<!--   -->\n"
       
   283                 + "</a>\n"
       
   284                 + "<ul class=\"blockListLast\">\n"
       
   285                 + "<li class=\"blockList\">\n"
       
   286                 + "<h4>delta</h4>\n"
       
   287                 + "<pre>public final&nbsp;java.util.List&lt;"
       
   288                 + "java.util.Set&lt;? super java.lang.Object&gt;&gt; deltaProperty</pre>\n"
       
   289                 + "</li>\n"
       
   290                 + "</ul>\n"
       
   291                 + "</li>\n"
       
   292                 + "</ul>",
       
   293                 "<h3>Property Summary</h3>\n"
       
   294                 + "<table class=\"memberSummary\" summary=\"Property Summary table, listing properties, and an explanation\">\n"
       
   295                 + "<caption><span>Properties</span><span class=\"tabEnd\">&nbsp;</span></caption>");
       
   296     }
       
   297 
   229     /*
   298     /*
   230      * Test without -javafx option, to ensure property getters and setters
   299      * Test without -javafx option, to ensure property getters and setters
   231      * are treated just like any other java method.
   300      * are treated just like any other java method.
   232      */
   301      */
   233     @Test
   302     @Test
   244                 + "<th class=\"colLast\" scope=\"col\">Description</th>\n"
   313                 + "<th class=\"colLast\" scope=\"col\">Description</th>\n"
   245                 + "</tr>\n"
   314                 + "</tr>\n"
   246                 + "<tr id=\"i0\" class=\"altColor\">\n"
   315                 + "<tr id=\"i0\" class=\"altColor\">\n"
   247                 + "<td class=\"colFirst\"><code>&lt;T&gt;&nbsp;java.lang.Object</code></td>\n"
   316                 + "<td class=\"colFirst\"><code>&lt;T&gt;&nbsp;java.lang.Object</code></td>\n"
   248                 + "<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\">"
   317                 + "<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\">"
       
   318                 + "<a href=\"#alphaProperty(java.util.List)\">alphaProperty</a>"
       
   319                 + "</span>&#8203;(java.util.List&lt;T&gt;&nbsp;foo)</code></th>\n"
       
   320                 + "<td class=\"colLast\">&nbsp;</td>\n"
       
   321                 + "</tr>\n"
       
   322                 + "<tr id=\"i1\" class=\"rowColor\">\n"
       
   323                 + "<td class=\"colFirst\"><code>java.lang.Object</code></td>\n"
       
   324                 + "<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\">"
       
   325                 + "<a href=\"#betaProperty()\">betaProperty</a></span>()</code></th>\n"
       
   326                 + "<td class=\"colLast\">&nbsp;</td>\n"
       
   327                 + "</tr>\n"
       
   328                 + "<tr id=\"i2\" class=\"altColor\">\n"
       
   329                 + "<td class=\"colFirst\"><code>java.util.List&lt;java.util.Set&lt;? super java.lang.Object&gt;&gt;"
       
   330                 + "</code></td>\n"
       
   331                 + "<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\">"
       
   332                 + "<a href=\"#deltaProperty()\">deltaProperty</a></span>()</code></th>\n"
       
   333                 + "<td class=\"colLast\">&nbsp;</td>\n"
       
   334                 + "</tr>\n"
       
   335                 + "<tr id=\"i3\" class=\"rowColor\">\n"
       
   336                 + "<td class=\"colFirst\"><code>java.util.List&lt;java.lang.String&gt;</code></td>\n"
       
   337                 + "<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\">"
       
   338                 + "<a href=\"#gammaProperty()\">gammaProperty</a></span>()</code></th>\n"
       
   339                 + "<td class=\"colLast\">&nbsp;</td>"
       
   340         );
       
   341     }
       
   342 
       
   343     @Test
       
   344     void test3_html4() {
       
   345         javadoc("-d", "out2b-html4",
       
   346                 "-html4",
       
   347                 "-sourcepath", testSrc,
       
   348                 "-package",
       
   349                 "pkg2");
       
   350         checkExit(Exit.OK);
       
   351         checkOutput("pkg2/Test.html", true,
       
   352                 "<th class=\"colFirst\" scope=\"col\">Modifier and Type</th>\n"
       
   353                 + "<th class=\"colSecond\" scope=\"col\">Method</th>\n"
       
   354                 + "<th class=\"colLast\" scope=\"col\">Description</th>\n"
       
   355                 + "</tr>\n"
       
   356                 + "<tr id=\"i0\" class=\"altColor\">\n"
       
   357                 + "<td class=\"colFirst\"><code>&lt;T&gt;&nbsp;java.lang.Object</code></td>\n"
       
   358                 + "<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\">"
   249                 + "<a href=\"#alphaProperty-java.util.List-\">alphaProperty</a>"
   359                 + "<a href=\"#alphaProperty-java.util.List-\">alphaProperty</a>"
   250                 + "</span>&#8203;(java.util.List&lt;T&gt;&nbsp;foo)</code></th>\n"
   360                 + "</span>&#8203;(java.util.List&lt;T&gt;&nbsp;foo)</code></th>\n"
   251                 + "<td class=\"colLast\">&nbsp;</td>\n"
   361                 + "<td class=\"colLast\">&nbsp;</td>\n"
   252                 + "</tr>\n"
   362                 + "</tr>\n"
   253                 + "<tr id=\"i1\" class=\"rowColor\">\n"
   363                 + "<tr id=\"i1\" class=\"rowColor\">\n"