10
|
1 |
/*
|
23971
|
2 |
* Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved.
|
10
|
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 |
*
|
5520
|
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.
|
10
|
22 |
*/
|
|
23 |
|
18652
|
24 |
/*
|
10
|
25 |
* @test
|
|
26 |
* @summary Test for nested inline tags. *
|
|
27 |
* @author jamieh
|
|
28 |
* @library ../lib/
|
|
29 |
* @build JavadocTester
|
|
30 |
* @build testtaglets.UnderlineTaglet
|
|
31 |
* @build testtaglets.BoldTaglet
|
|
32 |
* @build testtaglets.GreenTaglet
|
|
33 |
* @build TestNestedInlineTag
|
|
34 |
* @run main TestNestedInlineTag
|
|
35 |
*/
|
|
36 |
|
18652
|
37 |
/**
|
|
38 |
* This should be green, underlined and bold (Class): {@underline {@bold {@green My test}}} .
|
|
39 |
*/
|
10
|
40 |
public class TestNestedInlineTag extends JavadocTester {
|
|
41 |
|
|
42 |
/**
|
|
43 |
* This should be green, underlined and bold (Field): {@underline {@bold {@green My test}}} .
|
|
44 |
*/
|
|
45 |
public int field;
|
|
46 |
|
|
47 |
/**
|
|
48 |
* This should be green, underlined and bold (Constructor): {@underline {@bold {@green My test}}} .
|
|
49 |
*/
|
|
50 |
public TestNestedInlineTag(){}
|
|
51 |
|
|
52 |
/**
|
|
53 |
* This should be green, underlined and bold (Method): {@underline {@bold {@green My test}}} .
|
|
54 |
*/
|
|
55 |
public void method(){}
|
|
56 |
|
|
57 |
private static final String[][] TEST = {
|
|
58 |
//Test nested inline tag in class description.
|
24072
|
59 |
{ "TestNestedInlineTag.html",
|
10
|
60 |
"This should be green, underlined and bold (Class): <u><b><font color=\"green\">My test</font></b></u>"
|
|
61 |
},
|
|
62 |
|
|
63 |
//Test nested inline tag in field description.
|
24072
|
64 |
{ "TestNestedInlineTag.html",
|
10
|
65 |
"This should be green, underlined and bold (Field): <u><b><font color=\"green\">My test</font></b></u>"
|
|
66 |
},
|
|
67 |
|
|
68 |
//Test nested inline tag in constructor description.
|
24072
|
69 |
{ "TestNestedInlineTag.html",
|
10
|
70 |
"This should be green, underlined and bold (Constructor): <u><b><font color=\"green\">My test</font></b></u>"
|
|
71 |
},
|
|
72 |
|
|
73 |
//Test nested inline tag in method description.
|
24072
|
74 |
{ "TestNestedInlineTag.html",
|
10
|
75 |
"This should be green, underlined and bold (Method): <u><b><font color=\"green\">My test</font></b></u>"
|
|
76 |
}
|
|
77 |
};
|
|
78 |
|
|
79 |
private static final String[] ARGS =
|
|
80 |
new String[] {
|
24072
|
81 |
"-d", OUTPUT_DIR, "-sourcepath", SRC_DIR,
|
10
|
82 |
"-taglet", "testtaglets.UnderlineTaglet",
|
|
83 |
"-taglet", "testtaglets.BoldTaglet",
|
|
84 |
"-taglet", "testtaglets.GreenTaglet",
|
23971
|
85 |
SRC_DIR + "/TestNestedInlineTag.java"
|
10
|
86 |
};
|
|
87 |
|
|
88 |
/**
|
|
89 |
* The entry point of the test.
|
|
90 |
* @param args the array of command line arguments.
|
|
91 |
*/
|
|
92 |
public static void main(String[] args) {
|
|
93 |
TestNestedInlineTag tester = new TestNestedInlineTag();
|
24071
|
94 |
tester.run(ARGS, TEST, NO_TEST);
|
10
|
95 |
tester.printSummary();
|
|
96 |
}
|
|
97 |
}
|