langtools/test/com/sun/javadoc/testIndentation/TestIndentation.java
author coffeys
Wed, 02 Apr 2014 20:15:59 +0100
changeset 23753 27d1fe3a2bef
parent 17564 c329fe11193d
child 23971 f5ff1f5a8dee
permissions -rw-r--r--
8039108: Build Broken: 8035618 fix breaks corba build Reviewed-by: alanb
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
17564
c329fe11193d 8011288: Erratic/inconsistent indentation of signatures
jjg
parents:
diff changeset
     1
/*
c329fe11193d 8011288: Erratic/inconsistent indentation of signatures
jjg
parents:
diff changeset
     2
 * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
c329fe11193d 8011288: Erratic/inconsistent indentation of signatures
jjg
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
c329fe11193d 8011288: Erratic/inconsistent indentation of signatures
jjg
parents:
diff changeset
     4
 *
c329fe11193d 8011288: Erratic/inconsistent indentation of signatures
jjg
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
c329fe11193d 8011288: Erratic/inconsistent indentation of signatures
jjg
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
c329fe11193d 8011288: Erratic/inconsistent indentation of signatures
jjg
parents:
diff changeset
     7
 * published by the Free Software Foundation.
c329fe11193d 8011288: Erratic/inconsistent indentation of signatures
jjg
parents:
diff changeset
     8
 *
c329fe11193d 8011288: Erratic/inconsistent indentation of signatures
jjg
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
c329fe11193d 8011288: Erratic/inconsistent indentation of signatures
jjg
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
c329fe11193d 8011288: Erratic/inconsistent indentation of signatures
jjg
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
c329fe11193d 8011288: Erratic/inconsistent indentation of signatures
jjg
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
c329fe11193d 8011288: Erratic/inconsistent indentation of signatures
jjg
parents:
diff changeset
    13
 * accompanied this code).
c329fe11193d 8011288: Erratic/inconsistent indentation of signatures
jjg
parents:
diff changeset
    14
 *
c329fe11193d 8011288: Erratic/inconsistent indentation of signatures
jjg
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
c329fe11193d 8011288: Erratic/inconsistent indentation of signatures
jjg
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
c329fe11193d 8011288: Erratic/inconsistent indentation of signatures
jjg
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
c329fe11193d 8011288: Erratic/inconsistent indentation of signatures
jjg
parents:
diff changeset
    18
 *
c329fe11193d 8011288: Erratic/inconsistent indentation of signatures
jjg
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
c329fe11193d 8011288: Erratic/inconsistent indentation of signatures
jjg
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
c329fe11193d 8011288: Erratic/inconsistent indentation of signatures
jjg
parents:
diff changeset
    21
 * questions.
c329fe11193d 8011288: Erratic/inconsistent indentation of signatures
jjg
parents:
diff changeset
    22
 */
c329fe11193d 8011288: Erratic/inconsistent indentation of signatures
jjg
parents:
diff changeset
    23
c329fe11193d 8011288: Erratic/inconsistent indentation of signatures
jjg
parents:
diff changeset
    24
/*
c329fe11193d 8011288: Erratic/inconsistent indentation of signatures
jjg
parents:
diff changeset
    25
 * @test
c329fe11193d 8011288: Erratic/inconsistent indentation of signatures
jjg
parents:
diff changeset
    26
 * @bug      8011288
c329fe11193d 8011288: Erratic/inconsistent indentation of signatures
jjg
parents:
diff changeset
    27
 * @summary  Erratic/inconsistent indentation of signatures
c329fe11193d 8011288: Erratic/inconsistent indentation of signatures
jjg
parents:
diff changeset
    28
 * @library  ../lib/
c329fe11193d 8011288: Erratic/inconsistent indentation of signatures
jjg
parents:
diff changeset
    29
 * @build    JavadocTester
c329fe11193d 8011288: Erratic/inconsistent indentation of signatures
jjg
parents:
diff changeset
    30
 * @run main TestIndentation
c329fe11193d 8011288: Erratic/inconsistent indentation of signatures
jjg
parents:
diff changeset
    31
 */
c329fe11193d 8011288: Erratic/inconsistent indentation of signatures
jjg
parents:
diff changeset
    32
c329fe11193d 8011288: Erratic/inconsistent indentation of signatures
jjg
parents:
diff changeset
    33
public class TestIndentation extends JavadocTester {
c329fe11193d 8011288: Erratic/inconsistent indentation of signatures
jjg
parents:
diff changeset
    34
c329fe11193d 8011288: Erratic/inconsistent indentation of signatures
jjg
parents:
diff changeset
    35
    //Test information.
c329fe11193d 8011288: Erratic/inconsistent indentation of signatures
jjg
parents:
diff changeset
    36
    private static final String BUG_ID = "8011288";
c329fe11193d 8011288: Erratic/inconsistent indentation of signatures
jjg
parents:
diff changeset
    37
c329fe11193d 8011288: Erratic/inconsistent indentation of signatures
jjg
parents:
diff changeset
    38
    //Javadoc arguments.
c329fe11193d 8011288: Erratic/inconsistent indentation of signatures
jjg
parents:
diff changeset
    39
    private static final String[] ARGS = new String[] {
c329fe11193d 8011288: Erratic/inconsistent indentation of signatures
jjg
parents:
diff changeset
    40
        "-d", BUG_ID, "-sourcepath", SRC_DIR, "p"
c329fe11193d 8011288: Erratic/inconsistent indentation of signatures
jjg
parents:
diff changeset
    41
    };
c329fe11193d 8011288: Erratic/inconsistent indentation of signatures
jjg
parents:
diff changeset
    42
c329fe11193d 8011288: Erratic/inconsistent indentation of signatures
jjg
parents:
diff changeset
    43
    //Input for string search tests.
c329fe11193d 8011288: Erratic/inconsistent indentation of signatures
jjg
parents:
diff changeset
    44
    private static final String[][] TEST = {
c329fe11193d 8011288: Erratic/inconsistent indentation of signatures
jjg
parents:
diff changeset
    45
        { BUG_ID + FS + "p" + FS + "Indent.html",
c329fe11193d 8011288: Erratic/inconsistent indentation of signatures
jjg
parents:
diff changeset
    46
          "<pre>public&nbsp;&lt;T&gt;&nbsp;void&nbsp;m(T&nbsp;t1," },
c329fe11193d 8011288: Erratic/inconsistent indentation of signatures
jjg
parents:
diff changeset
    47
        { BUG_ID + FS + "p" + FS + "Indent.html",
c329fe11193d 8011288: Erratic/inconsistent indentation of signatures
jjg
parents:
diff changeset
    48
          NL + "                  T&nbsp;t2)" },
c329fe11193d 8011288: Erratic/inconsistent indentation of signatures
jjg
parents:
diff changeset
    49
        { BUG_ID + FS + "p" + FS + "Indent.html",
c329fe11193d 8011288: Erratic/inconsistent indentation of signatures
jjg
parents:
diff changeset
    50
          NL + "           throws java.lang.Exception" }
c329fe11193d 8011288: Erratic/inconsistent indentation of signatures
jjg
parents:
diff changeset
    51
    };
c329fe11193d 8011288: Erratic/inconsistent indentation of signatures
jjg
parents:
diff changeset
    52
    private static final String[][] NEGATED_TEST = NO_TEST;
c329fe11193d 8011288: Erratic/inconsistent indentation of signatures
jjg
parents:
diff changeset
    53
c329fe11193d 8011288: Erratic/inconsistent indentation of signatures
jjg
parents:
diff changeset
    54
    /**
c329fe11193d 8011288: Erratic/inconsistent indentation of signatures
jjg
parents:
diff changeset
    55
     * The entry point of the test.
c329fe11193d 8011288: Erratic/inconsistent indentation of signatures
jjg
parents:
diff changeset
    56
     * @param args the array of command line arguments.
c329fe11193d 8011288: Erratic/inconsistent indentation of signatures
jjg
parents:
diff changeset
    57
     */
c329fe11193d 8011288: Erratic/inconsistent indentation of signatures
jjg
parents:
diff changeset
    58
    public static void main(String[] args) {
c329fe11193d 8011288: Erratic/inconsistent indentation of signatures
jjg
parents:
diff changeset
    59
        TestIndentation tester = new TestIndentation();
c329fe11193d 8011288: Erratic/inconsistent indentation of signatures
jjg
parents:
diff changeset
    60
        run(tester, ARGS, TEST, NEGATED_TEST);
c329fe11193d 8011288: Erratic/inconsistent indentation of signatures
jjg
parents:
diff changeset
    61
        tester.printSummary();
c329fe11193d 8011288: Erratic/inconsistent indentation of signatures
jjg
parents:
diff changeset
    62
    }
c329fe11193d 8011288: Erratic/inconsistent indentation of signatures
jjg
parents:
diff changeset
    63
c329fe11193d 8011288: Erratic/inconsistent indentation of signatures
jjg
parents:
diff changeset
    64
    /**
c329fe11193d 8011288: Erratic/inconsistent indentation of signatures
jjg
parents:
diff changeset
    65
     * {@inheritDoc}
c329fe11193d 8011288: Erratic/inconsistent indentation of signatures
jjg
parents:
diff changeset
    66
     */
c329fe11193d 8011288: Erratic/inconsistent indentation of signatures
jjg
parents:
diff changeset
    67
    public String getBugId() {
c329fe11193d 8011288: Erratic/inconsistent indentation of signatures
jjg
parents:
diff changeset
    68
        return BUG_ID;
c329fe11193d 8011288: Erratic/inconsistent indentation of signatures
jjg
parents:
diff changeset
    69
    }
c329fe11193d 8011288: Erratic/inconsistent indentation of signatures
jjg
parents:
diff changeset
    70
c329fe11193d 8011288: Erratic/inconsistent indentation of signatures
jjg
parents:
diff changeset
    71
    /**
c329fe11193d 8011288: Erratic/inconsistent indentation of signatures
jjg
parents:
diff changeset
    72
     * {@inheritDoc}
c329fe11193d 8011288: Erratic/inconsistent indentation of signatures
jjg
parents:
diff changeset
    73
     */
c329fe11193d 8011288: Erratic/inconsistent indentation of signatures
jjg
parents:
diff changeset
    74
    public String getBugName() {
c329fe11193d 8011288: Erratic/inconsistent indentation of signatures
jjg
parents:
diff changeset
    75
        return getClass().getName();
c329fe11193d 8011288: Erratic/inconsistent indentation of signatures
jjg
parents:
diff changeset
    76
    }
c329fe11193d 8011288: Erratic/inconsistent indentation of signatures
jjg
parents:
diff changeset
    77
}