langtools/test/com/sun/javadoc/testTagInheritence/TestTagInheritence.java
changeset 23971 f5ff1f5a8dee
parent 15354 52a04c670c05
child 24065 fc4022e50129
equal deleted inserted replaced
23970:76f4acb11952 23971:f5ff1f5a8dee
     1 /*
     1 /*
     2  * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     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
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
    32  * @run main TestTagInheritence
    32  * @run main TestTagInheritence
    33  */
    33  */
    34 
    34 
    35 public class TestTagInheritence extends JavadocTester {
    35 public class TestTagInheritence extends JavadocTester {
    36 
    36 
    37     private static final String BUG_ID = "4496223-4496270-4618686-4720974-4812240-6253614-6253604";
    37     private static final String BUG_ID =
       
    38         "4496223-4496270-4618686-4720974-4812240-6253614-6253604";
    38     private static final String[] ARGS = new String[] {
    39     private static final String[] ARGS = new String[] {
    39         "-Xdoclint:none", "-d", BUG_ID, "-sourcepath", SRC_DIR, "pkg", "firstSentence", "firstSentence2"
    40         "-Xdoclint:none", "-d", BUG_ID, "-sourcepath", SRC_DIR, "pkg",
       
    41         "firstSentence", "firstSentence2"
    40     };
    42     };
    41 
    43 
    42     /**
    44     /**
    43      * The entry point of the test.
    45      * The entry point of the test.
    44      * @param args the array of command line arguments.
    46      * @param args the array of command line arguments.
    50         tests[0][1] = "warning - @inheritDoc used but testBadInheritDocTag() " +
    52         tests[0][1] = "warning - @inheritDoc used but testBadInheritDocTag() " +
    51             "does not override or implement any method.";
    53             "does not override or implement any method.";
    52 
    54 
    53         //Test valid usage of inheritDoc tag.
    55         //Test valid usage of inheritDoc tag.
    54         for (int i = 1; i < tests.length-2; i++) {
    56         for (int i = 1; i < tests.length-2; i++) {
    55             tests[i][0] = BUG_ID + FS + "pkg" + FS + "TestTagInheritence.html";
    57             tests[i][0] = BUG_ID + "/pkg/TestTagInheritence.html";
    56             tests[i][1] = "Test " + i + " passes";
    58             tests[i][1] = "Test " + i + " passes";
    57         }
    59         }
    58 
    60 
    59         //First sentence test (6253614)
    61         //First sentence test (6253614)
    60         tests[tests.length - 2][0] =BUG_ID + FS + "firstSentence" + FS +
    62         tests[tests.length - 2][0] =BUG_ID + "/firstSentence/" +
    61             "B.html";
    63             "B.html";
    62         tests[tests.length - 2][1] =  "<div class=\"block\">First sentence.</div>";
    64         tests[tests.length - 2][1] =  "<div class=\"block\">First sentence.</div>";
    63 
    65 
    64         //Another first sentence test (6253604)
    66         //Another first sentence test (6253604)
    65         tests[tests.length - 1][0] =BUG_ID + FS + "firstSentence2" + FS +
    67         tests[tests.length - 1][0] =BUG_ID + "/firstSentence2/" +
    66             "C.html";
    68             "C.html";
    67         tests[tests.length - 1][1] =  "<div class=\"block\">First sentence.</div>";
    69         tests[tests.length - 1][1] =  "<div class=\"block\">First sentence.</div>";
    68 
    70 
    69         TestTagInheritence tester = new TestTagInheritence();
    71         TestTagInheritence tester = new TestTagInheritence();
    70         run(tester, ARGS, tests, NO_TEST);
    72         run(tester, ARGS, tests, NO_TEST);