author | jjg |
Wed, 16 Apr 2014 16:17:09 -0700 | |
changeset 23971 | f5ff1f5a8dee |
parent 21478 | fa4c7cda1b41 |
child 24065 | fc4022e50129 |
permissions | -rw-r--r-- |
13842 | 1 |
/* |
23971 | 2 |
* Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved. |
13842 | 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 |
|
21478
fa4c7cda1b41
8026567: Use meaningful style names for strong and italic styles.
bpatel
parents:
17567
diff
changeset
|
26 |
* @bug 7180906 8026567 |
13842 | 27 |
* @summary Test to make sure that the since tag works correctly |
28 |
* @author Bhavesh Patel |
|
29 |
* @library ../lib/ |
|
30 |
* @build JavadocTester TestSinceTag |
|
31 |
* @run main TestSinceTag |
|
32 |
*/ |
|
33 |
||
34 |
public class TestSinceTag extends JavadocTester { |
|
35 |
||
36 |
//Test information. |
|
37 |
private static final String BUG_ID = "7180906"; |
|
38 |
||
39 |
//Javadoc arguments. |
|
40 |
private static final String[] ARGS1 = new String[] { |
|
41 |
"-d", BUG_ID, "-sourcepath", SRC_DIR, "pkg1" |
|
42 |
}; |
|
43 |
||
44 |
private static final String[] ARGS2 = new String[] { |
|
45 |
"-d", BUG_ID, "-sourcepath", SRC_DIR, "-nosince", "pkg1" |
|
46 |
}; |
|
47 |
||
48 |
//Input for string search tests. |
|
49 |
private static final String[][] TEST = { |
|
23971 | 50 |
{BUG_ID + "/pkg1/C1.html", |
51 |
"<dl>\n" + |
|
52 |
"<dt><span class=\"simpleTagLabel\">Since:</span></dt>\n" + |
|
17566
7e1a338e1085
8012175: Convert TagletOutputImpl to use ContentBuilder instead of StringBuilder
jjg
parents:
13842
diff
changeset
|
53 |
"<dd>JDK1.0</dd>" |
13842 | 54 |
}, |
23971 | 55 |
{BUG_ID + "/serialized-form.html", |
56 |
"<dl>\n" + |
|
57 |
"<dt><span class=\"simpleTagLabel\">Since:</span></dt>\n" + |
|
17566
7e1a338e1085
8012175: Convert TagletOutputImpl to use ContentBuilder instead of StringBuilder
jjg
parents:
13842
diff
changeset
|
58 |
"<dd>1.4</dd>" |
13842 | 59 |
} |
60 |
}; |
|
61 |
||
62 |
/** |
|
63 |
* The entry point of the test. |
|
64 |
* @param args the array of command line arguments. |
|
65 |
*/ |
|
66 |
public static void main(String[] args) { |
|
67 |
TestSinceTag tester = new TestSinceTag(); |
|
68 |
run(tester, ARGS1, TEST, NO_TEST); |
|
69 |
run(tester, ARGS2, NO_TEST, TEST); |
|
70 |
tester.printSummary(); |
|
71 |
} |
|
72 |
||
73 |
/** |
|
74 |
* {@inheritDoc} |
|
75 |
*/ |
|
76 |
public String getBugId() { |
|
77 |
return BUG_ID; |
|
78 |
} |
|
79 |
||
80 |
/** |
|
81 |
* {@inheritDoc} |
|
82 |
*/ |
|
83 |
public String getBugName() { |
|
84 |
return getClass().getName(); |
|
85 |
} |
|
86 |
} |