1/* 2 * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved. 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 26 * @bug 4927552 8026567 27 * @summary <DESC> 28 * @author jamieh 29 * @library ../lib 30 * @modules jdk.javadoc 31 * @build JavadocTester 32 * @run main TestDeprecatedDocs 33 */ 34 35public class TestDeprecatedDocs extends JavadocTester { 36 37 public static void main(String... args) throws Exception { 38 TestDeprecatedDocs tester = new TestDeprecatedDocs(); 39 tester.runTests(); 40 } 41 42 @Test 43 void test() { 44 javadoc("-d", "out", 45 "-sourcepath", testSrc, 46 "pkg"); 47 checkExit(Exit.OK); 48 49 checkOutput("deprecated-list.html", true, 50 "annotation_test1 passes", 51 "annotation_test2 passes", 52 "annotation_test3 passes", 53 "class_test1 passes", 54 "class_test2 passes", 55 "class_test3 passes", 56 "class_test4 passes", 57 "enum_test1 passes", 58 "enum_test2 passes", 59 "error_test1 passes", 60 "error_test2 passes", 61 "error_test3 passes", 62 "error_test4 passes", 63 "exception_test1 passes", 64 "exception_test2 passes", 65 "exception_test3 passes", 66 "exception_test4 passes", 67 "interface_test1 passes", 68 "interface_test2 passes", 69 "interface_test3 passes", 70 "interface_test4 passes", 71 "pkg.DeprecatedClassByAnnotation", 72 "pkg.DeprecatedClassByAnnotation()", 73 "pkg.DeprecatedClassByAnnotation.method()", 74 "pkg.DeprecatedClassByAnnotation.field" 75 ); 76 77 checkOutput("pkg/DeprecatedClassByAnnotation.html", true, 78 "<pre>@Deprecated\n" 79 + "public class <span class=\"typeNameLabel\">DeprecatedClassByAnnotation</span>\n" 80 + "extends java.lang.Object</pre>", 81 "<pre>@Deprecated\n" 82 + "public int field</pre>\n" 83 + "<div class=\"block\"><span class=\"deprecatedLabel\">Deprecated.</span> </div>", 84 "<pre>@Deprecated\n" 85 + "public DeprecatedClassByAnnotation()</pre>\n" 86 + "<div class=\"block\"><span class=\"deprecatedLabel\">Deprecated.</span> </div>", 87 "<pre>@Deprecated\n" 88 + "public void method()</pre>\n" 89 + "<div class=\"block\"><span class=\"deprecatedLabel\">Deprecated.</span> </div>"); 90 } 91} 92