1 /* 2 * Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 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 7 * published by the Free Software Foundation. 8 * 9 * This code is distributed in the hope that it will be useful, but WITHOUT 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12 * version 2 for more details (a copy is included in the LICENSE file that 13 * accompanied this code). 14 * 15 * You should have received a copy of the GNU General Public License version 16 * 2 along with this work; if not, write to the Free Software Foundation, 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 */ 23 24 /* 25 * @test 26 * @bug 8176231 8189843 8182765 8203791 27 * @summary Test JavaFX property. 28 * @library ../../lib/ 29 * @modules jdk.javadoc/jdk.javadoc.internal.tool 30 * @build javadoc.tester.* TestProperty 31 * @run main TestProperty 32 */ 33 34 import javadoc.tester.JavadocTester; 35 36 public class TestProperty extends JavadocTester { 37 38 public static void main(String... args) throws Exception { 39 TestProperty tester = new TestProperty(); 40 tester.runTests(); 41 } 42 43 @Test 44 public void testArrays() { 45 javadoc("-d", "out", 46 "-javafx", 47 "--disable-javafx-strict-checks", 48 "-sourcepath", testSrc, 49 "pkg"); 50 checkExit(Exit.OK); 51 52 checkOutput("pkg/MyClass.html", true, 53 "<div class=\"memberSignature\"><span class=\"modifiers\">public final</span> " 54 + "<span class=\"returnType\"><a href=\"ObjectProperty.html\" title=\"class in pkg\">" 55 + "ObjectProperty</a><<a href=\"MyObj.html\" title=\"class in pkg\">MyObj</a>></span>" 56 + " <span class=\"memberName\">goodProperty</span></div>\n" 57 + "<div class=\"block\">This is an Object property where the " 58 + "Object is a single Object.</div>\n" 59 + "<dl>\n" 60 + "<dt><span class=\"seeLabel\">See Also:</span></dt>\n" 61 + "<dd><a href=\"#getGood()\"><code>getGood()</code></a>, \n" 62 + "<a href=\"#setGood(pkg.MyObj)\">" 63 + "<code>setGood(MyObj)</code></a></dd>\n" 64 + "</dl>", 65 66 "<div class=\"memberSignature\"><span class=\"modifiers\">public final</span> " 67 + "<span class=\"returnType\"><a href=\"ObjectProperty.html\" title=\"class in pkg\">" 68 + "ObjectProperty</a><<a href=\"MyObj.html\" title=\"class in pkg\">MyObj</a>[]></span>" 69 + " <span class=\"memberName\">badProperty</span></div>\n" 70 + "<div class=\"block\">This is an Object property where the " 71 + "Object is an array.</div>\n" 72 + "<dl>\n" 73 + "<dt><span class=\"seeLabel\">See Also:</span></dt>\n" 74 + "<dd><a href=\"#getBad()\"><code>getBad()</code></a>, \n" 75 + "<a href=\"#setBad(pkg.MyObj%5B%5D)\">" 76 + "<code>setBad(MyObj[])</code></a></dd>\n" 77 + "</dl>", 78 79 // id should not be used in the property table 80 "<tr class=\"altColor\">\n" 81 + "<td class=\"colFirst\"><code><a href=\"ObjectProperty.html\" " 82 + "title=\"class in pkg\">ObjectProperty</a><<a href=\"MyObj.html\" " 83 + "title=\"class in pkg\">MyObj</a>[]></code></td>\n" 84 + "<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\">" 85 + "<a href=\"#badProperty\">bad</a></span></code></th>", 86 87 // id should be used in the method table 88 "<tr class=\"altColor\" id=\"i0\">\n" 89 + "<td class=\"colFirst\"><code><a href=\"ObjectProperty.html\" " 90 + "title=\"class in pkg\">ObjectProperty</a><<a href=\"MyObj.html\" " 91 + "title=\"class in pkg\">MyObj</a>[]></code></td>\n" 92 + "<th class=\"colSecond\" scope=\"row\"><code><span class=\"memberNameLink\">" 93 + "<a href=\"#badProperty()\">badProperty</a></span>()</code></th>" 94 ); 95 96 checkOutput("pkg/MyClassT.html", true, 97 "<div class=\"memberSignature\"><span class=\"modifiers\">public final</span> " 98 + "<span class=\"returnType\"><a href=\"ObjectProperty.html\" title=\"class in pkg\">" 99 + "ObjectProperty</a><java.util.List<<a href=\"MyClassT.html\" " 100 + "title=\"type parameter in MyClassT\">T</a>>></span> " 101 + "<span class=\"memberName\">listProperty</span></div>\n" 102 + "<div class=\"block\">This is an Object property where the " 103 + "Object is a single <code>List<T></code>.</div>\n" 104 + "<dl>\n" 105 + "<dt><span class=\"seeLabel\">See Also:</span></dt>\n" 106 + "<dd><a href=\"#getList()\">" 107 + "<code>getList()</code></a>, \n" 108 + "<a href=\"#setList(java.util.List)\">" 109 + "<code>setList(List)</code></a></dd>\n" 110 + "</dl>" 111 ); 112 } 113 } 114 --- EOF ---