author | jjg |
Fri, 09 May 2014 15:37:12 -0700 | |
changeset 24399 | af1a0220d0fa |
parent 24072 | e7549dcbc4af |
child 30730 | d3ce7619db2c |
permissions | -rw-r--r-- |
15034
b7c791bc4526
8004891: Check for abstract method in javadoc does not conform to the language model
bpatel
parents:
diff
changeset
|
1 |
/* |
23971 | 2 |
* Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved. |
15034
b7c791bc4526
8004891: Check for abstract method in javadoc does not conform to the language model
bpatel
parents:
diff
changeset
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
b7c791bc4526
8004891: Check for abstract method in javadoc does not conform to the language model
bpatel
parents:
diff
changeset
|
4 |
* |
b7c791bc4526
8004891: Check for abstract method in javadoc does not conform to the language model
bpatel
parents:
diff
changeset
|
5 |
* This code is free software; you can redistribute it and/or modify it |
b7c791bc4526
8004891: Check for abstract method in javadoc does not conform to the language model
bpatel
parents:
diff
changeset
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
b7c791bc4526
8004891: Check for abstract method in javadoc does not conform to the language model
bpatel
parents:
diff
changeset
|
7 |
* published by the Free Software Foundation. |
b7c791bc4526
8004891: Check for abstract method in javadoc does not conform to the language model
bpatel
parents:
diff
changeset
|
8 |
* |
b7c791bc4526
8004891: Check for abstract method in javadoc does not conform to the language model
bpatel
parents:
diff
changeset
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
b7c791bc4526
8004891: Check for abstract method in javadoc does not conform to the language model
bpatel
parents:
diff
changeset
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
b7c791bc4526
8004891: Check for abstract method in javadoc does not conform to the language model
bpatel
parents:
diff
changeset
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
b7c791bc4526
8004891: Check for abstract method in javadoc does not conform to the language model
bpatel
parents:
diff
changeset
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
b7c791bc4526
8004891: Check for abstract method in javadoc does not conform to the language model
bpatel
parents:
diff
changeset
|
13 |
* accompanied this code). |
b7c791bc4526
8004891: Check for abstract method in javadoc does not conform to the language model
bpatel
parents:
diff
changeset
|
14 |
* |
b7c791bc4526
8004891: Check for abstract method in javadoc does not conform to the language model
bpatel
parents:
diff
changeset
|
15 |
* You should have received a copy of the GNU General Public License version |
b7c791bc4526
8004891: Check for abstract method in javadoc does not conform to the language model
bpatel
parents:
diff
changeset
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
b7c791bc4526
8004891: Check for abstract method in javadoc does not conform to the language model
bpatel
parents:
diff
changeset
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
b7c791bc4526
8004891: Check for abstract method in javadoc does not conform to the language model
bpatel
parents:
diff
changeset
|
18 |
* |
b7c791bc4526
8004891: Check for abstract method in javadoc does not conform to the language model
bpatel
parents:
diff
changeset
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
b7c791bc4526
8004891: Check for abstract method in javadoc does not conform to the language model
bpatel
parents:
diff
changeset
|
20 |
* or visit www.oracle.com if you need additional information or have any |
b7c791bc4526
8004891: Check for abstract method in javadoc does not conform to the language model
bpatel
parents:
diff
changeset
|
21 |
* questions. |
b7c791bc4526
8004891: Check for abstract method in javadoc does not conform to the language model
bpatel
parents:
diff
changeset
|
22 |
*/ |
b7c791bc4526
8004891: Check for abstract method in javadoc does not conform to the language model
bpatel
parents:
diff
changeset
|
23 |
|
b7c791bc4526
8004891: Check for abstract method in javadoc does not conform to the language model
bpatel
parents:
diff
changeset
|
24 |
/* |
b7c791bc4526
8004891: Check for abstract method in javadoc does not conform to the language model
bpatel
parents:
diff
changeset
|
25 |
* @test |
b7c791bc4526
8004891: Check for abstract method in javadoc does not conform to the language model
bpatel
parents:
diff
changeset
|
26 |
* @bug 8004891 |
b7c791bc4526
8004891: Check for abstract method in javadoc does not conform to the language model
bpatel
parents:
diff
changeset
|
27 |
* @summary Make sure that the abstract method is identified correctly |
b7c791bc4526
8004891: Check for abstract method in javadoc does not conform to the language model
bpatel
parents:
diff
changeset
|
28 |
* if the abstract modifier is present explicitly or implicitly. |
b7c791bc4526
8004891: Check for abstract method in javadoc does not conform to the language model
bpatel
parents:
diff
changeset
|
29 |
* @author bpatel |
24399
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
30 |
* @library ../lib |
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
31 |
* @build JavadocTester |
15034
b7c791bc4526
8004891: Check for abstract method in javadoc does not conform to the language model
bpatel
parents:
diff
changeset
|
32 |
* @run main TestAbstractMethod |
b7c791bc4526
8004891: Check for abstract method in javadoc does not conform to the language model
bpatel
parents:
diff
changeset
|
33 |
*/ |
b7c791bc4526
8004891: Check for abstract method in javadoc does not conform to the language model
bpatel
parents:
diff
changeset
|
34 |
|
b7c791bc4526
8004891: Check for abstract method in javadoc does not conform to the language model
bpatel
parents:
diff
changeset
|
35 |
public class TestAbstractMethod extends JavadocTester { |
b7c791bc4526
8004891: Check for abstract method in javadoc does not conform to the language model
bpatel
parents:
diff
changeset
|
36 |
|
24399
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
37 |
public static void main(String... args) throws Exception { |
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
38 |
TestAbstractMethod tester = new TestAbstractMethod(); |
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
39 |
tester.runTests(); |
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
40 |
} |
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
41 |
|
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
42 |
@Test |
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
43 |
void test() { |
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
44 |
javadoc("-d", "out", |
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
45 |
"-sourcepath", testSrc, |
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
46 |
"pkg"); |
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
47 |
checkExit(Exit.OK); |
15034
b7c791bc4526
8004891: Check for abstract method in javadoc does not conform to the language model
bpatel
parents:
diff
changeset
|
48 |
|
24399
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
49 |
checkOutput("pkg/A.html", true, |
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
50 |
"<td class=\"colFirst\"><code>default void</code></td>", |
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
51 |
"<caption><span id=\"t0\" class=\"activeTableTab\"><span>" |
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
52 |
+ "All Methods</span><span class=\"tabEnd\"> </span></span>" |
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
53 |
+ "<span id=\"t2\" class=\"tableTab\"><span>" |
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
54 |
+ "<a href=\"javascript:show(2);\">Instance Methods</a></span>" |
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
55 |
+ "<span class=\"tabEnd\"> </span></span><span id=\"t3\" " |
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
56 |
+ "class=\"tableTab\"><span><a href=\"javascript:show(4);\">" |
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
57 |
+ "Abstract Methods</a></span><span class=\"tabEnd\"> </span>" |
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
58 |
+ "</span><span id=\"t5\" class=\"tableTab\"><span>" |
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
59 |
+ "<a href=\"javascript:show(16);\">Default Methods</a></span>" |
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
60 |
+ "<span class=\"tabEnd\"> </span></span></caption>"); |
15034
b7c791bc4526
8004891: Check for abstract method in javadoc does not conform to the language model
bpatel
parents:
diff
changeset
|
61 |
|
24399
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
62 |
checkOutput("pkg/B.html", true, |
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
63 |
"<caption><span id=\"t0\" class=\"activeTableTab\"><span>" |
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
64 |
+ "All Methods</span><span class=\"tabEnd\"> </span></span>" |
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
65 |
+ "<span id=\"t2\" class=\"tableTab\"><span>" |
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
66 |
+ "<a href=\"javascript:show(2);\">Instance Methods</a></span>" |
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
67 |
+ "<span class=\"tabEnd\"> </span></span><span id=\"t3\" " |
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
68 |
+ "class=\"tableTab\"><span><a href=\"javascript:show(4);\">Abstract " |
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
69 |
+ "Methods</a></span><span class=\"tabEnd\"> </span></span>" |
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
70 |
+ "<span id=\"t4\" class=\"tableTab\"><span>" |
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
71 |
+ "<a href=\"javascript:show(8);\">Concrete Methods</a></span>" |
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
72 |
+ "<span class=\"tabEnd\"> </span></span></caption>", |
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
73 |
"<td class=\"colFirst\"><code>abstract void</code></td>"); |
15034
b7c791bc4526
8004891: Check for abstract method in javadoc does not conform to the language model
bpatel
parents:
diff
changeset
|
74 |
|
24399
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
75 |
checkOutput("pkg/C.html", true, |
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
76 |
"<caption><span id=\"t0\" class=\"activeTableTab\"><span>" |
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
77 |
+ "All Methods</span><span class=\"tabEnd\"> </span></span>" |
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
78 |
+ "<span id=\"t2\" class=\"tableTab\"><span>" |
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
79 |
+ "<a href=\"javascript:show(2);\">Instance Methods</a></span>" |
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
80 |
+ "<span class=\"tabEnd\"> </span></span>" |
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
81 |
+ "<span id=\"t5\" class=\"tableTab\"><span>" |
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
82 |
+ "<a href=\"javascript:show(16);\">Default Methods</a></span>" |
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
83 |
+ "<span class=\"tabEnd\"> </span></span></caption>", |
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
84 |
"<td class=\"colFirst\"><code>default void</code></td>"); |
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
85 |
|
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
86 |
checkOutput("pkg/A.html", false, |
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
87 |
"<td class=\"colFirst\"><code>abstract void</code></td>"); |
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
88 |
|
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
89 |
checkOutput("pkg/B.html", false, |
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
90 |
"<span><a href=\"javascript:show(16);\">Default Methods</a></span>" |
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
91 |
+ "<span class=\"tabEnd\"> </span>", |
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
92 |
"<td class=\"colFirst\"><code>default void</code></td>"); |
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
93 |
|
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
94 |
checkOutput("pkg/C.html", false, |
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
95 |
"<span><a href=\"javascript:show(4);\">Abstract Methods</a></span>" |
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
96 |
+ "<span class=\"tabEnd\"> </span>"); |
15034
b7c791bc4526
8004891: Check for abstract method in javadoc does not conform to the language model
bpatel
parents:
diff
changeset
|
97 |
} |
b7c791bc4526
8004891: Check for abstract method in javadoc does not conform to the language model
bpatel
parents:
diff
changeset
|
98 |
} |