< prev index next >

test/langtools/jdk/javadoc/doclet/testProperty/TestProperty.java

Print this page




  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                 "<pre>public final&nbsp;<a href=\"ObjectProperty.html\" "
  54                 + "title=\"class in pkg\">ObjectProperty</a>"
  55                 + "&lt;<a href=\"MyObj.html\" "
  56                 + "title=\"class in pkg\">MyObj</a>&gt; goodProperty</pre>\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                 "<pre>public final&nbsp;<a href=\"ObjectProperty.html\" "
  67                 + "title=\"class in pkg\">ObjectProperty</a>"
  68                 + "&lt;<a href=\"MyObj.html\" "
  69                 + "title=\"class in pkg\">MyObj</a>[]&gt; badProperty</pre>\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>&lt;<a href=\"MyObj.html\" "
  83                 + "title=\"class in pkg\">MyObj</a>[]&gt;</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>&lt;<a href=\"MyObj.html\" "
  91                 + "title=\"class in pkg\">MyObj</a>[]&gt;</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                 "<pre>public final&nbsp;<a href=\"ObjectProperty.html\" "
  98                 + "title=\"class in pkg\">ObjectProperty</a>"
  99                 + "&lt;java.util.List&lt;<a href=\"MyClassT.html\" "
 100                 + "title=\"type parameter in MyClassT\">T</a>&gt;&gt; "
 101                 + "listProperty</pre>\n"
 102                 + "<div class=\"block\">This is an Object property where the "
 103                 + "Object is a single <code>List&lt;T&gt;</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 


  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>&nbsp;"
  54                 + "<span class=\"returnType\"><a href=\"ObjectProperty.html\" title=\"class in pkg\">"
  55                 + "ObjectProperty</a>&lt;<a href=\"MyObj.html\" title=\"class in pkg\">MyObj</a>&gt;</span>"
  56                 + "&nbsp;<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>&nbsp;"
  67                 + "<span class=\"returnType\"><a href=\"ObjectProperty.html\" title=\"class in pkg\">"
  68                 + "ObjectProperty</a>&lt;<a href=\"MyObj.html\" title=\"class in pkg\">MyObj</a>[]&gt;</span>"
  69                 + "&nbsp;<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>&lt;<a href=\"MyObj.html\" "
  83                 + "title=\"class in pkg\">MyObj</a>[]&gt;</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>&lt;<a href=\"MyObj.html\" "
  91                 + "title=\"class in pkg\">MyObj</a>[]&gt;</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>&nbsp;"
  98                 + "<span class=\"returnType\"><a href=\"ObjectProperty.html\" title=\"class in pkg\">"
  99                 + "ObjectProperty</a>&lt;java.util.List&lt;<a href=\"MyClassT.html\" "
 100                 + "title=\"type parameter in MyClassT\">T</a>&gt;&gt;</span>&nbsp;"
 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&lt;T&gt;</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 
< prev index next >