author | hannesw |
Tue, 22 Mar 2016 14:23:16 +0100 | |
changeset 36690 | 06b714373aa4 |
parent 30730 | d3ce7619db2c |
permissions | -rw-r--r-- |
10 | 1 |
/* |
30730
d3ce7619db2c
8076543: Add @modules as needed to the langtools tests
akulyakh
parents:
5520
diff
changeset
|
2 |
* Copyright (c) 2002, 2015, 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 |
||
24 |
/* |
|
25 |
* @test |
|
26 |
* @bug 4587562 |
|
27 |
* @summary tool: Indentation messed up for javadoc comments omitting preceding * |
|
28 |
* @author gafter |
|
30730
d3ce7619db2c
8076543: Add @modules as needed to the langtools tests
akulyakh
parents:
5520
diff
changeset
|
29 |
* @modules jdk.javadoc |
10 | 30 |
* @run main NoStar |
31 |
*/ |
|
32 |
||
33 |
import com.sun.javadoc.*; |
|
34 |
import java.util.*; |
|
35 |
||
36 |
/** First sentence. |
|
37 |
0 |
|
38 |
1 |
|
39 |
2 |
|
40 |
3 |
|
41 |
4 |
|
42 |
5 |
|
43 |
*/ |
|
44 |
public class NoStar extends Doclet |
|
45 |
{ |
|
46 |
public static void main(String[] args) { |
|
47 |
if (com.sun.tools.javadoc.Main. |
|
1475 | 48 |
execute("javadoc", "NoStar", NoStar.class.getClassLoader(), |
10 | 49 |
new String[] {System.getProperty("test.src", ".") + java.io.File.separatorChar + "NoStar.java"}) != 0) |
50 |
throw new Error(); |
|
51 |
} |
|
52 |
||
53 |
public static boolean start(com.sun.javadoc.RootDoc root) { |
|
54 |
ClassDoc[] classes = root.classes(); |
|
55 |
if (classes.length != 1) |
|
56 |
throw new Error("1 " + Arrays.asList(classes)); |
|
57 |
ClassDoc self = classes[0]; |
|
58 |
String c = self.commentText(); |
|
59 |
System.out.println("\"" + c + "\""); |
|
60 |
return c.equals("First sentence.\n0\n 1\n 2\n 3\n 4\n 5"); |
|
61 |
} |
|
62 |
} |