test/langtools/jdk/javadoc/doclet/testOrdering/TestOrdering.java
author chegar
Thu, 17 Oct 2019 20:54:25 +0100
branchdatagramsocketimpl-branch
changeset 58679 9c3209ff7550
parent 58678 9cf78a70fa4f
parent 55339 0530705ca300
permissions -rw-r--r--
datagramsocketimpl-branch: merge with default
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
24220
eb213562268d 8039410: [javadoc] fix class-use items to be deterministic and index ordering
ksrini
parents:
diff changeset
     1
/*
53562
0d9dee001667 8215577: Remove javadoc support for HTML 4
pmuthuswamy
parents: 53097
diff changeset
     2
 * Copyright (c) 2014, 2019, Oracle and/or its affiliates. All rights reserved.
24220
eb213562268d 8039410: [javadoc] fix class-use items to be deterministic and index ordering
ksrini
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
eb213562268d 8039410: [javadoc] fix class-use items to be deterministic and index ordering
ksrini
parents:
diff changeset
     4
 *
eb213562268d 8039410: [javadoc] fix class-use items to be deterministic and index ordering
ksrini
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
eb213562268d 8039410: [javadoc] fix class-use items to be deterministic and index ordering
ksrini
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
eb213562268d 8039410: [javadoc] fix class-use items to be deterministic and index ordering
ksrini
parents:
diff changeset
     7
 * published by the Free Software Foundation.
eb213562268d 8039410: [javadoc] fix class-use items to be deterministic and index ordering
ksrini
parents:
diff changeset
     8
 *
eb213562268d 8039410: [javadoc] fix class-use items to be deterministic and index ordering
ksrini
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
eb213562268d 8039410: [javadoc] fix class-use items to be deterministic and index ordering
ksrini
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
eb213562268d 8039410: [javadoc] fix class-use items to be deterministic and index ordering
ksrini
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
eb213562268d 8039410: [javadoc] fix class-use items to be deterministic and index ordering
ksrini
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
eb213562268d 8039410: [javadoc] fix class-use items to be deterministic and index ordering
ksrini
parents:
diff changeset
    13
 * accompanied this code).
eb213562268d 8039410: [javadoc] fix class-use items to be deterministic and index ordering
ksrini
parents:
diff changeset
    14
 *
eb213562268d 8039410: [javadoc] fix class-use items to be deterministic and index ordering
ksrini
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
eb213562268d 8039410: [javadoc] fix class-use items to be deterministic and index ordering
ksrini
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
eb213562268d 8039410: [javadoc] fix class-use items to be deterministic and index ordering
ksrini
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
eb213562268d 8039410: [javadoc] fix class-use items to be deterministic and index ordering
ksrini
parents:
diff changeset
    18
 *
eb213562268d 8039410: [javadoc] fix class-use items to be deterministic and index ordering
ksrini
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
eb213562268d 8039410: [javadoc] fix class-use items to be deterministic and index ordering
ksrini
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
eb213562268d 8039410: [javadoc] fix class-use items to be deterministic and index ordering
ksrini
parents:
diff changeset
    21
 * questions.
eb213562268d 8039410: [javadoc] fix class-use items to be deterministic and index ordering
ksrini
parents:
diff changeset
    22
 */
eb213562268d 8039410: [javadoc] fix class-use items to be deterministic and index ordering
ksrini
parents:
diff changeset
    23
eb213562268d 8039410: [javadoc] fix class-use items to be deterministic and index ordering
ksrini
parents:
diff changeset
    24
/*
eb213562268d 8039410: [javadoc] fix class-use items to be deterministic and index ordering
ksrini
parents:
diff changeset
    25
 * @test
50293
edfb87b2520e 8196202: Javadoc should not generate frames by default
jjg
parents: 49879
diff changeset
    26
 * @bug 8039410 8042601 8042829 8049393 8050031 8155061 8155995 8167967 8169813 8182765 8196202
24220
eb213562268d 8039410: [javadoc] fix class-use items to be deterministic and index ordering
ksrini
parents:
diff changeset
    27
 * @summary test to determine if members are ordered correctly
53097
2e82ca64b25d 8215516: Move JavadocTester to a named package
jjg
parents: 50895
diff changeset
    28
 * @library ../../lib/
36526
3b41f1c69604 8142968: Module System implementation
alanb
parents: 35426
diff changeset
    29
 * @modules jdk.javadoc/jdk.javadoc.internal.tool
53097
2e82ca64b25d 8215516: Move JavadocTester to a named package
jjg
parents: 50895
diff changeset
    30
 * @build javadoc.tester.*
24220
eb213562268d 8039410: [javadoc] fix class-use items to be deterministic and index ordering
ksrini
parents:
diff changeset
    31
 * @run main TestOrdering
eb213562268d 8039410: [javadoc] fix class-use items to be deterministic and index ordering
ksrini
parents:
diff changeset
    32
 */
eb213562268d 8039410: [javadoc] fix class-use items to be deterministic and index ordering
ksrini
parents:
diff changeset
    33
25004
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
    34
import java.io.File;
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
    35
import java.io.IOException;
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
    36
import java.nio.file.Files;
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
    37
import java.util.ArrayList;
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
    38
import java.util.Arrays;
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
    39
import java.util.Collections;
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
    40
import java.util.List;
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
    41
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
    42
import static java.nio.file.StandardOpenOption.*;
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
    43
53097
2e82ca64b25d 8215516: Move JavadocTester to a named package
jjg
parents: 50895
diff changeset
    44
import javadoc.tester.JavadocTester;
2e82ca64b25d 8215516: Move JavadocTester to a named package
jjg
parents: 50895
diff changeset
    45
24399
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24394
diff changeset
    46
public class TestOrdering extends JavadocTester {
24220
eb213562268d 8039410: [javadoc] fix class-use items to be deterministic and index ordering
ksrini
parents:
diff changeset
    47
eb213562268d 8039410: [javadoc] fix class-use items to be deterministic and index ordering
ksrini
parents:
diff changeset
    48
    public static void main(String[] args) throws Exception {
eb213562268d 8039410: [javadoc] fix class-use items to be deterministic and index ordering
ksrini
parents:
diff changeset
    49
        TestOrdering tester = new TestOrdering();
24399
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24394
diff changeset
    50
        tester.runTests();
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24394
diff changeset
    51
    }
24220
eb213562268d 8039410: [javadoc] fix class-use items to be deterministic and index ordering
ksrini
parents:
diff changeset
    52
24399
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24394
diff changeset
    53
    @Test
53097
2e82ca64b25d 8215516: Move JavadocTester to a named package
jjg
parents: 50895
diff changeset
    54
    public void testUnnamedPackagesForClassUse() {
2e82ca64b25d 8215516: Move JavadocTester to a named package
jjg
parents: 50895
diff changeset
    55
        new UnnamedPackageForClassUseTest().run();
24399
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24394
diff changeset
    56
    }
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24394
diff changeset
    57
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24394
diff changeset
    58
    @Test
53097
2e82ca64b25d 8215516: Move JavadocTester to a named package
jjg
parents: 50895
diff changeset
    59
    public void testNamedPackagesForClassUse() {
2e82ca64b25d 8215516: Move JavadocTester to a named package
jjg
parents: 50895
diff changeset
    60
        new NamedPackagesForClassUseTest().run();
24220
eb213562268d 8039410: [javadoc] fix class-use items to be deterministic and index ordering
ksrini
parents:
diff changeset
    61
    }
eb213562268d 8039410: [javadoc] fix class-use items to be deterministic and index ordering
ksrini
parents:
diff changeset
    62
25004
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
    63
    @Test
53097
2e82ca64b25d 8215516: Move JavadocTester to a named package
jjg
parents: 50895
diff changeset
    64
    public void testIndexOrdering() throws IOException {
2e82ca64b25d 8215516: Move JavadocTester to a named package
jjg
parents: 50895
diff changeset
    65
        new IndexOrderingTest().run();
25004
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
    66
    }
25300
3b8a5067fe29 8047162: [javadoc] index files are non deterministic
ksrini
parents: 25004
diff changeset
    67
3b8a5067fe29 8047162: [javadoc] index files are non deterministic
ksrini
parents: 25004
diff changeset
    68
    @Test
53097
2e82ca64b25d 8215516: Move JavadocTester to a named package
jjg
parents: 50895
diff changeset
    69
    public void testIndexTypeClustering() {
2e82ca64b25d 8215516: Move JavadocTester to a named package
jjg
parents: 50895
diff changeset
    70
        new IndexTypeClusteringTest().run();
25300
3b8a5067fe29 8047162: [javadoc] index files are non deterministic
ksrini
parents: 25004
diff changeset
    71
    }
35426
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 30730
diff changeset
    72
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 30730
diff changeset
    73
    @Test
53097
2e82ca64b25d 8215516: Move JavadocTester to a named package
jjg
parents: 50895
diff changeset
    74
    public void testTypeElementMemberOrdering() {
2e82ca64b25d 8215516: Move JavadocTester to a named package
jjg
parents: 50895
diff changeset
    75
        new TypeElementMemberOrderingTest().run();
35426
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 30730
diff changeset
    76
    }
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 30730
diff changeset
    77
53097
2e82ca64b25d 8215516: Move JavadocTester to a named package
jjg
parents: 50895
diff changeset
    78
    class UnnamedPackageForClassUseTest {
42000
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
    79
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
    80
        void run() {
53097
2e82ca64b25d 8215516: Move JavadocTester to a named package
jjg
parents: 50895
diff changeset
    81
            javadoc("-d", "out",
42000
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
    82
                    "-sourcepath", testSrc,
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
    83
                    "-use",
53097
2e82ca64b25d 8215516: Move JavadocTester to a named package
jjg
parents: 50895
diff changeset
    84
                    testSrc("C.java"), testSrc("UsedInC.java"));
2e82ca64b25d 8215516: Move JavadocTester to a named package
jjg
parents: 50895
diff changeset
    85
            checkExit(Exit.OK);
42000
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
    86
            checkExecutableMemberOrdering("class-use/UsedInC.html");
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
    87
        }
35426
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 30730
diff changeset
    88
42000
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
    89
        void checkExecutableMemberOrdering(String usePage) {
53097
2e82ca64b25d 8215516: Move JavadocTester to a named package
jjg
parents: 50895
diff changeset
    90
            String contents = readFile(usePage);
42000
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
    91
            // check constructors
53097
2e82ca64b25d 8215516: Move JavadocTester to a named package
jjg
parents: 50895
diff changeset
    92
            checking("constructors");
49139
771616d26ca1 8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents: 48654
diff changeset
    93
            int idx1 = contents.indexOf("C.html#%3Cinit%3E(UsedInC");
771616d26ca1 8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents: 48654
diff changeset
    94
            int idx2 = contents.indexOf("C.html#%3Cinit%3E(UsedInC,int");
771616d26ca1 8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents: 48654
diff changeset
    95
            int idx3 = contents.indexOf("C.html#%3Cinit%3E(UsedInC,java.lang.String");
42000
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
    96
            if (idx1 == -1 || idx2 == -1 || idx3 == -1) {
53097
2e82ca64b25d 8215516: Move JavadocTester to a named package
jjg
parents: 50895
diff changeset
    97
                failed("ctor strings not found");
42000
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
    98
            } else if (idx1 > idx2 || idx2 > idx3 || idx1 > idx3) {
53097
2e82ca64b25d 8215516: Move JavadocTester to a named package
jjg
parents: 50895
diff changeset
    99
                failed("ctor strings are out of order");
42000
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   100
            } else {
53097
2e82ca64b25d 8215516: Move JavadocTester to a named package
jjg
parents: 50895
diff changeset
   101
                passed("ctor strings are in order");
42000
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   102
            }
40511
1b3c502e0bdc 8155995: Update javadoc to include module search
bpatel
parents: 37752
diff changeset
   103
42000
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   104
            // check methods
53097
2e82ca64b25d 8215516: Move JavadocTester to a named package
jjg
parents: 50895
diff changeset
   105
            checking("methods");
49139
771616d26ca1 8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents: 48654
diff changeset
   106
            idx1 = contents.indexOf("C.html#ymethod(int");
771616d26ca1 8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents: 48654
diff changeset
   107
            idx2 = contents.indexOf("C.html#ymethod(java.lang.String");
42000
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   108
            if (idx1 == -1 || idx2 == -1) {
53097
2e82ca64b25d 8215516: Move JavadocTester to a named package
jjg
parents: 50895
diff changeset
   109
                failed("#ymethod strings not found");
42000
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   110
            } else if (idx1 > idx2) {
53097
2e82ca64b25d 8215516: Move JavadocTester to a named package
jjg
parents: 50895
diff changeset
   111
                failed("#ymethod strings are out of order");
42000
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   112
            } else {
53097
2e82ca64b25d 8215516: Move JavadocTester to a named package
jjg
parents: 50895
diff changeset
   113
                passed("Executable Member Ordering: OK");
42000
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   114
            }
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   115
        }
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   116
    }
37752
4243173b58db 8155061: javadoc incorrectly sorted items in All Classes list and Index files
ksrini
parents: 36526
diff changeset
   117
53097
2e82ca64b25d 8215516: Move JavadocTester to a named package
jjg
parents: 50895
diff changeset
   118
    class NamedPackagesForClassUseTest {
40511
1b3c502e0bdc 8155995: Update javadoc to include module search
bpatel
parents: 37752
diff changeset
   119
42000
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   120
        public void run() {
53097
2e82ca64b25d 8215516: Move JavadocTester to a named package
jjg
parents: 50895
diff changeset
   121
            javadoc("-d", "out-1",
2e82ca64b25d 8215516: Move JavadocTester to a named package
jjg
parents: 50895
diff changeset
   122
                    "-sourcepath", testSrc,
42000
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   123
                    "-use",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   124
                    "pkg1");
53097
2e82ca64b25d 8215516: Move JavadocTester to a named package
jjg
parents: 50895
diff changeset
   125
            checkExit(Exit.OK);
42000
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   126
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   127
            checkClassUseOrdering("pkg1/class-use/UsedClass.html");
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   128
53097
2e82ca64b25d 8215516: Move JavadocTester to a named package
jjg
parents: 50895
diff changeset
   129
            checkOrder("pkg1/class-use/UsedClass.html",
49139
771616d26ca1 8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents: 48654
diff changeset
   130
                    "../MethodOrder.html#m()",
771616d26ca1 8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents: 48654
diff changeset
   131
                    "../MethodOrder.html#m(byte%5B%5D)",
771616d26ca1 8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents: 48654
diff changeset
   132
                    "../MethodOrder.html#m(double)",
771616d26ca1 8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents: 48654
diff changeset
   133
                    "../MethodOrder.html#m(double,double)",
771616d26ca1 8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents: 48654
diff changeset
   134
                    "../MethodOrder.html#m(double,java.lang.Double)",
771616d26ca1 8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents: 48654
diff changeset
   135
                    "../MethodOrder.html#m(int)",
771616d26ca1 8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents: 48654
diff changeset
   136
                    "../MethodOrder.html#m(int,int)",
771616d26ca1 8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents: 48654
diff changeset
   137
                    "../MethodOrder.html#m(int,java.lang.Integer)",
771616d26ca1 8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents: 48654
diff changeset
   138
                    "../MethodOrder.html#m(long)",
771616d26ca1 8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents: 48654
diff changeset
   139
                    "../MethodOrder.html#m(long,long)",
771616d26ca1 8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents: 48654
diff changeset
   140
                    "../MethodOrder.html#m(long,java.lang.Long)",
771616d26ca1 8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents: 48654
diff changeset
   141
                    "../MethodOrder.html#m(long,java.lang.Long...)",
771616d26ca1 8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents: 48654
diff changeset
   142
                    "../MethodOrder.html#m(java.lang.Double)",
771616d26ca1 8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents: 48654
diff changeset
   143
                    "../MethodOrder.html#m(java.lang.Double,double)",
771616d26ca1 8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents: 48654
diff changeset
   144
                    "../MethodOrder.html#m(java.lang.Double,java.lang.Double)",
771616d26ca1 8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents: 48654
diff changeset
   145
                    "../MethodOrder.html#m(java.lang.Integer)",
771616d26ca1 8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents: 48654
diff changeset
   146
                    "../MethodOrder.html#m(java.lang.Integer,int)",
771616d26ca1 8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents: 48654
diff changeset
   147
                    "../MethodOrder.html#m(java.lang.Integer,java.lang.Integer)",
771616d26ca1 8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents: 48654
diff changeset
   148
                    "../MethodOrder.html#m(java.lang.Object%5B%5D)",
771616d26ca1 8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents: 48654
diff changeset
   149
                    "../MethodOrder.html#m(java.util.ArrayList)",
771616d26ca1 8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents: 48654
diff changeset
   150
                    "../MethodOrder.html#m(java.util.Collection)",
771616d26ca1 8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents: 48654
diff changeset
   151
                    "../MethodOrder.html#m(java.util.List)");
42000
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   152
53097
2e82ca64b25d 8215516: Move JavadocTester to a named package
jjg
parents: 50895
diff changeset
   153
            checkOrder("pkg1/class-use/UsedClass.html",
49139
771616d26ca1 8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents: 48654
diff changeset
   154
                    "../MethodOrder.html#tpm(pkg1.UsedClass)",
771616d26ca1 8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents: 48654
diff changeset
   155
                    "../MethodOrder.html#tpm(pkg1.UsedClass,pkg1.UsedClass)",
771616d26ca1 8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents: 48654
diff changeset
   156
                    "../MethodOrder.html#tpm(pkg1.UsedClass,pkg1.UsedClass%5B%5D)",
771616d26ca1 8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents: 48654
diff changeset
   157
                    "../MethodOrder.html#tpm(pkg1.UsedClass,java.lang.String)");
37752
4243173b58db 8155061: javadoc incorrectly sorted items in All Classes list and Index files
ksrini
parents: 36526
diff changeset
   158
53097
2e82ca64b25d 8215516: Move JavadocTester to a named package
jjg
parents: 50895
diff changeset
   159
            checkOrder("pkg1/class-use/UsedClass.html",
49139
771616d26ca1 8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents: 48654
diff changeset
   160
                    "../A.html#%3Cinit%3E(pkg1.UsedClass)",
771616d26ca1 8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents: 48654
diff changeset
   161
                    "../B.A.html#%3Cinit%3E(pkg1.UsedClass)",
771616d26ca1 8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents: 48654
diff changeset
   162
                    "../B.html#%3Cinit%3E(pkg1.UsedClass)",
771616d26ca1 8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents: 48654
diff changeset
   163
                    "../A.C.html#%3Cinit%3E(pkg1.UsedClass,java.lang.Object%5B%5D)",
771616d26ca1 8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents: 48654
diff changeset
   164
                    "../A.C.html#%3Cinit%3E(pkg1.UsedClass,java.util.Collection)",
771616d26ca1 8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents: 48654
diff changeset
   165
                    "../A.C.html#%3Cinit%3E(pkg1.UsedClass,java.util.List)");
42000
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   166
53097
2e82ca64b25d 8215516: Move JavadocTester to a named package
jjg
parents: 50895
diff changeset
   167
            checkOrder("pkg1/ImplementsOrdering.html",
42000
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   168
                    "<dd><code>close</code>&nbsp;in interface&nbsp;<code>java.lang.AutoCloseable</code></dd>",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   169
                    "<dd><code>close</code>&nbsp;in interface&nbsp;<code>java.nio.channels.Channel</code></dd>",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   170
                    "<dd><code>close</code>&nbsp;in interface&nbsp;<code>java.io.Closeable</code></dd>");
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   171
53097
2e82ca64b25d 8215516: Move JavadocTester to a named package
jjg
parents: 50895
diff changeset
   172
            checkOrder("pkg1/OverrideOrdering.html",
42000
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   173
                    "<dd><code>iterator</code>&nbsp;in interface&nbsp;<code>java.util.Collection&lt;",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   174
                    "<dd><code>iterator</code>&nbsp;in interface&nbsp;<code>java.lang.Iterable&lt;");
37752
4243173b58db 8155061: javadoc incorrectly sorted items in All Classes list and Index files
ksrini
parents: 36526
diff changeset
   175
        }
4243173b58db 8155061: javadoc incorrectly sorted items in All Classes list and Index files
ksrini
parents: 36526
diff changeset
   176
42000
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   177
        void checkClassUseOrdering(String usePage) {
48654
36f58bd6269f 8195796: Reduce the size of relative URLs in generated docs
jjg
parents: 47216
diff changeset
   178
            checkClassUseOrdering(usePage, "C#ITERATION#.html#zfield");
36f58bd6269f 8195796: Reduce the size of relative URLs in generated docs
jjg
parents: 47216
diff changeset
   179
            checkClassUseOrdering(usePage, "C#ITERATION#.html#fieldInC#ITERATION#");
49139
771616d26ca1 8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents: 48654
diff changeset
   180
            checkClassUseOrdering(usePage, "C#ITERATION#.html#zmethod(pkg1.UsedClass");
48654
36f58bd6269f 8195796: Reduce the size of relative URLs in generated docs
jjg
parents: 47216
diff changeset
   181
            checkClassUseOrdering(usePage, "C#ITERATION#.html#methodInC#ITERATION#");
42000
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   182
        }
24220
eb213562268d 8039410: [javadoc] fix class-use items to be deterministic and index ordering
ksrini
parents:
diff changeset
   183
42000
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   184
        void checkClassUseOrdering(String usePage, String searchString) {
53097
2e82ca64b25d 8215516: Move JavadocTester to a named package
jjg
parents: 50895
diff changeset
   185
            String contents = readFile(usePage);
42000
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   186
            int lastidx = 0;
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   187
            System.out.println("testing for " + searchString);
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   188
            for (int i = 1; i < 5; i++) {
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   189
                String s = searchString.replaceAll("#ITERATION#", Integer.toString(i));
53097
2e82ca64b25d 8215516: Move JavadocTester to a named package
jjg
parents: 50895
diff changeset
   190
                checking(s);
42000
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   191
                int idx = contents.indexOf(s);
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   192
                if (idx < lastidx) {
53097
2e82ca64b25d 8215516: Move JavadocTester to a named package
jjg
parents: 50895
diff changeset
   193
                    failed(s + ", member ordering error, last:" + lastidx + ", got:" + idx);
42000
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   194
                } else {
53097
2e82ca64b25d 8215516: Move JavadocTester to a named package
jjg
parents: 50895
diff changeset
   195
                    passed("\tlast: " + lastidx + " got:" + idx);
42000
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   196
                }
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   197
                lastidx = idx;
24220
eb213562268d 8039410: [javadoc] fix class-use items to be deterministic and index ordering
ksrini
parents:
diff changeset
   198
            }
eb213562268d 8039410: [javadoc] fix class-use items to be deterministic and index ordering
ksrini
parents:
diff changeset
   199
        }
eb213562268d 8039410: [javadoc] fix class-use items to be deterministic and index ordering
ksrini
parents:
diff changeset
   200
    }
eb213562268d 8039410: [javadoc] fix class-use items to be deterministic and index ordering
ksrini
parents:
diff changeset
   201
53097
2e82ca64b25d 8215516: Move JavadocTester to a named package
jjg
parents: 50895
diff changeset
   202
    enum ListOrder {
2e82ca64b25d 8215516: Move JavadocTester to a named package
jjg
parents: 50895
diff changeset
   203
        NONE, REVERSE, SHUFFLE
2e82ca64b25d 8215516: Move JavadocTester to a named package
jjg
parents: 50895
diff changeset
   204
    };
42000
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   205
53097
2e82ca64b25d 8215516: Move JavadocTester to a named package
jjg
parents: 50895
diff changeset
   206
    class IndexOrderingTest {
42000
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   207
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   208
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   209
        /*
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   210
         * By default we do not shuffle the input list, in order to keep the list deterministic,
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   211
         * and the test predictable. However, we can turn on the stress mode, by setting the following
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   212
         * property if required.
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   213
         */
53097
2e82ca64b25d 8215516: Move JavadocTester to a named package
jjg
parents: 50895
diff changeset
   214
        final ListOrder STRESS_MODE = Boolean.getBoolean("TestOrder.STRESS")
42000
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   215
                ? ListOrder.SHUFFLE
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   216
                : ListOrder.REVERSE;
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   217
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   218
        /*
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   219
         * Controls the number of children packages, pkg0, pkg0.pkg, pkg0.pkg.pkg, .....
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   220
         * Note: having too long a depth (> 256 chars on Windows), will likely lead to
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   221
         * cause problems with automated build and test systems.
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   222
         */
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   223
        static final int MAX_SUBPACKAGES_DEPTH = 4;
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   224
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   225
        /*
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   226
         * Controls the number of sibling packages,  pkg0, pkg1, pkg2, .....
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   227
         */
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   228
        static final int MAX_PACKAGES = 4;
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   229
53097
2e82ca64b25d 8215516: Move JavadocTester to a named package
jjg
parents: 50895
diff changeset
   230
        String[] contents = {
42000
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   231
            "public add ADDADD;",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   232
            "public add AddAdd;",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   233
            "public add addadd;",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   234
            "public enum add {add, ADD, addd, ADDD};",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   235
            "public enum ADD {ADD, add, addd, ADDD};",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   236
            "public void   add(){}",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   237
            "public void   add(double d){}",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   238
            "public void   add(int i, float f){}",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   239
            "public void   add(float f, int i){}",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   240
            "public void   add(double d, byte b){}",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   241
            "public Double add(Double d) {return (double) 22/7;}",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   242
            "public double add(double d1, double d2) {return d1 + d2;}",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   243
            "public double add(double d1, Double  d2) {return d1 + d2;}",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   244
            "public Float  add(float f) {return (float) 22/7;}",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   245
            "public void   add(int i){}",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   246
            "public int    add(Integer i) {return 0;}"
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   247
        };
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   248
53097
2e82ca64b25d 8215516: Move JavadocTester to a named package
jjg
parents: 50895
diff changeset
   249
        String expectedEnumOrdering[] = {
42000
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   250
            "Add.add.html\" title=\"enum in REPLACE_ME\"",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   251
            "Add.ADD.html\" title=\"enum in REPLACE_ME\""
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   252
        };
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   253
53097
2e82ca64b25d 8215516: Move JavadocTester to a named package
jjg
parents: 50895
diff changeset
   254
        String expectedFieldOrdering[] = {
42000
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   255
            "Add.html#addadd\"",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   256
            "add0/add/add/add/Add.html#addadd\"",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   257
            "add0/add/add/Add.html#addadd\"",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   258
            "add0/add/Add.html#addadd\"",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   259
            "add0/Add.html#addadd\"",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   260
            "add1/add/add/add/Add.html#addadd\"",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   261
            "add1/add/add/Add.html#addadd\"",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   262
            "add1/add/Add.html#addadd\"",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   263
            "add1/Add.html#addadd\"",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   264
            "add2/add/add/add/Add.html#addadd\"",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   265
            "add2/add/add/Add.html#addadd\"",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   266
            "add2/add/Add.html#addadd\"",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   267
            "add2/Add.html#addadd\"",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   268
            "add3/add/add/add/Add.html#addadd\"",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   269
            "add3/add/add/Add.html#addadd\"",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   270
            "add3/add/Add.html#addadd\"",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   271
            "add3/Add.html#addadd\"",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   272
            "Add.html#AddAdd\"",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   273
            "add0/add/add/add/Add.html#AddAdd\"",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   274
            "add0/add/add/Add.html#AddAdd\"",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   275
            "add0/add/Add.html#AddAdd\"",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   276
            "add0/Add.html#AddAdd\"",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   277
            "add1/add/add/add/Add.html#AddAdd\"",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   278
            "add1/add/add/Add.html#AddAdd\"",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   279
            "add1/add/Add.html#AddAdd\"",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   280
            "add1/Add.html#AddAdd\"",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   281
            "add2/add/add/add/Add.html#AddAdd\"",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   282
            "add2/add/add/Add.html#AddAdd\"",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   283
            "add2/add/Add.html#AddAdd\"",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   284
            "add2/Add.html#AddAdd\"",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   285
            "add3/add/add/add/Add.html#AddAdd\"",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   286
            "add3/add/add/Add.html#AddAdd\"",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   287
            "add3/add/Add.html#AddAdd\"",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   288
            "add3/Add.html#AddAdd\"",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   289
            "Add.html#ADDADD\"",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   290
            "add0/add/add/add/Add.html#ADDADD\"",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   291
            "add0/add/add/Add.html#ADDADD\"",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   292
            "add0/add/Add.html#ADDADD\"",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   293
            "add0/Add.html#ADDADD\"",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   294
            "add1/add/add/add/Add.html#ADDADD\"",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   295
            "add1/add/add/Add.html#ADDADD\"",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   296
            "add1/add/Add.html#ADDADD\"",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   297
            "add1/Add.html#ADDADD\"",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   298
            "add2/add/add/add/Add.html#ADDADD\"",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   299
            "add2/add/add/Add.html#ADDADD\"",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   300
            "add2/add/Add.html#ADDADD\"",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   301
            "add2/Add.html#ADDADD\"",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   302
            "add3/add/add/add/Add.html#ADDADD\"",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   303
            "add3/add/add/Add.html#ADDADD\"",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   304
            "add3/add/Add.html#ADDADD\"",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   305
            "add3/Add.html#ADDADD\""
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   306
        };
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   307
53097
2e82ca64b25d 8215516: Move JavadocTester to a named package
jjg
parents: 50895
diff changeset
   308
        String expectedMethodOrdering[] = {
49139
771616d26ca1 8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents: 48654
diff changeset
   309
            "Add.html#add()",
771616d26ca1 8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents: 48654
diff changeset
   310
            "Add.html#add(double)",
771616d26ca1 8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents: 48654
diff changeset
   311
            "Add.html#add(double,byte)",
771616d26ca1 8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents: 48654
diff changeset
   312
            "Add.html#add(double,double)",
771616d26ca1 8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents: 48654
diff changeset
   313
            "Add.html#add(double,java.lang.Double)",
771616d26ca1 8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents: 48654
diff changeset
   314
            "Add.html#add(float)",
771616d26ca1 8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents: 48654
diff changeset
   315
            "Add.html#add(float,int)",
771616d26ca1 8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents: 48654
diff changeset
   316
            "Add.html#add(int)",
771616d26ca1 8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents: 48654
diff changeset
   317
            "Add.html#add(int,float)",
771616d26ca1 8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents: 48654
diff changeset
   318
            "Add.html#add(java.lang.Double)",
771616d26ca1 8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents: 48654
diff changeset
   319
            "Add.html#add(java.lang.Integer)"
42000
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   320
        };
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   321
53097
2e82ca64b25d 8215516: Move JavadocTester to a named package
jjg
parents: 50895
diff changeset
   322
        String expectedPackageOrdering[] = {
42000
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   323
            "\"add0/package-summary.html\">add0</a> - package add0",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   324
            "\"add0/add/package-summary.html\">add0.add</a> - package add0.add",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   325
            "\"add0/add/add/package-summary.html\">add0.add.add</a> - package add0.add.add",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   326
            "\"add0/add/add/add/package-summary.html\">add0.add.add.add</a> - package add0.add.add.add",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   327
            "\"add1/package-summary.html\">add1</a> - package add1",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   328
            "\"add1/add/package-summary.html\">add1.add</a> - package add1.add",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   329
            "\"add1/add/add/package-summary.html\">add1.add.add</a> - package add1.add.add",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   330
            "\"add1/add/add/add/package-summary.html\">add1.add.add.add</a> - package add1.add.add.add",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   331
            "\"add2/package-summary.html\">add2</a> - package add2",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   332
            "\"add2/add/package-summary.html\">add2.add</a> - package add2.add",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   333
            "\"add2/add/add/package-summary.html\">add2.add.add</a> - package add2.add.add",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   334
            "\"add2/add/add/add/package-summary.html\">add2.add.add.add</a> - package add2.add.add.add",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   335
            "\"add3/package-summary.html\">add3</a> - package add3",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   336
            "\"add3/add/package-summary.html\">add3.add</a> - package add3.add",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   337
            "\"add3/add/add/package-summary.html\">add3.add.add</a> - package add3.add.add",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   338
            "\"add3/add/add/add/package-summary.html\">add3.add.add.add</a> - package add3.add.add.add"
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   339
        };
25004
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   340
42000
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   341
        void run() throws IOException {
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   342
            final String clsname = "Add";
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   343
            List<String> cmdArgs = new ArrayList();
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   344
            cmdArgs.add("-d");
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   345
            cmdArgs.add("out-2");
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   346
            cmdArgs.add("-sourcepath");
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   347
            cmdArgs.add("src");
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   348
            cmdArgs.add("-package");
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   349
            System.out.println("STRESS_MODE: " + STRESS_MODE);
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   350
            emitFile(null, clsname, STRESS_MODE);
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   351
            for (int width = 0; width < MAX_PACKAGES; width++) {
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   352
                String wpkgname = "add" + width;
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   353
                String dpkgname = wpkgname;
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   354
                emitFile(wpkgname, clsname, ListOrder.NONE); // list as-is
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   355
                cmdArgs.add(wpkgname);
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   356
                for (int depth = 1; depth < MAX_SUBPACKAGES_DEPTH; depth++) {
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   357
                    dpkgname = dpkgname + ".add";
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   358
                    emitFile(dpkgname, clsname, STRESS_MODE);
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   359
                    cmdArgs.add(dpkgname);
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   360
                }
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   361
            }
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   362
            File srcDir = new File(new File("."), "src");
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   363
            cmdArgs.add(new File(srcDir, clsname + ".java").getPath());
53097
2e82ca64b25d 8215516: Move JavadocTester to a named package
jjg
parents: 50895
diff changeset
   364
            javadoc(cmdArgs.toArray(new String[cmdArgs.size()]));
2e82ca64b25d 8215516: Move JavadocTester to a named package
jjg
parents: 50895
diff changeset
   365
            checkExit(Exit.OK);
2e82ca64b25d 8215516: Move JavadocTester to a named package
jjg
parents: 50895
diff changeset
   366
            checkOrder("index-all.html", composeTestVectors());
2e82ca64b25d 8215516: Move JavadocTester to a named package
jjg
parents: 50895
diff changeset
   367
            checkOrder("add0/add/package-tree.html",
48654
36f58bd6269f 8195796: Reduce the size of relative URLs in generated docs
jjg
parents: 47216
diff changeset
   368
                    "<a href=\"Add.add.html\" title=\"enum in add0.add\">",
36f58bd6269f 8195796: Reduce the size of relative URLs in generated docs
jjg
parents: 47216
diff changeset
   369
                    "<a href=\"Add.ADD.html\" title=\"enum in add0.add\">");
53097
2e82ca64b25d 8215516: Move JavadocTester to a named package
jjg
parents: 50895
diff changeset
   370
            checkOrder("overview-tree.html",
42000
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   371
                    "<a href=\"Add.add.html\" title=\"enum in &lt;Unnamed&gt;\">",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   372
                    "<a href=\"add0/Add.add.html\" title=\"enum in add0\">",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   373
                    "<a href=\"add0/add/Add.add.html\" title=\"enum in add0.add\">",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   374
                    "<a href=\"add0/add/add/Add.add.html\" title=\"enum in add0.add.add\">",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   375
                    "<a href=\"add0/add/add/add/Add.add.html\" title=\"enum in add0.add.add.add\">",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   376
                    "<a href=\"add1/Add.add.html\" title=\"enum in add1\">",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   377
                    "<a href=\"add1/add/Add.add.html\" title=\"enum in add1.add\">",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   378
                    "<a href=\"add1/add/add/Add.add.html\" title=\"enum in add1.add.add\">",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   379
                    "<a href=\"add1/add/add/add/Add.add.html\" title=\"enum in add1.add.add.add\">",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   380
                    "<a href=\"add2/Add.add.html\" title=\"enum in add2\">",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   381
                    "<a href=\"add2/add/Add.add.html\" title=\"enum in add2.add\">",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   382
                    "<a href=\"add2/add/add/Add.add.html\" title=\"enum in add2.add.add\">",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   383
                    "<a href=\"add2/add/add/add/Add.add.html\" title=\"enum in add2.add.add.add\">",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   384
                    "<a href=\"add3/Add.add.html\" title=\"enum in add3\">",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   385
                    "<a href=\"add3/add/Add.add.html\" title=\"enum in add3.add\">",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   386
                    "<a href=\"add3/add/add/Add.add.html\" title=\"enum in add3.add.add\">",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   387
                    "<a href=\"add3/add/add/add/Add.add.html\" title=\"enum in add3.add.add.add\">",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   388
                    "<a href=\"Add.ADD.html\" title=\"enum in &lt;Unnamed&gt;\">",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   389
                    "<a href=\"add0/Add.ADD.html\" title=\"enum in add0\">",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   390
                    "<a href=\"add0/add/Add.ADD.html\" title=\"enum in add0.add\">",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   391
                    "<a href=\"add0/add/add/Add.ADD.html\" title=\"enum in add0.add.add\">",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   392
                    "<a href=\"add0/add/add/add/Add.ADD.html\" title=\"enum in add0.add.add.add\">",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   393
                    "<a href=\"add1/Add.ADD.html\" title=\"enum in add1\">",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   394
                    "<a href=\"add1/add/Add.ADD.html\" title=\"enum in add1.add\">",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   395
                    "<a href=\"add1/add/add/Add.ADD.html\" title=\"enum in add1.add.add\">",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   396
                    "<a href=\"add1/add/add/add/Add.ADD.html\" title=\"enum in add1.add.add.add\">",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   397
                    "<a href=\"add2/Add.ADD.html\" title=\"enum in add2\">",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   398
                    "<a href=\"add2/add/Add.ADD.html\" title=\"enum in add2.add\">",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   399
                    "<a href=\"add2/add/add/Add.ADD.html\" title=\"enum in add2.add.add\">",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   400
                    "<a href=\"add2/add/add/add/Add.ADD.html\" title=\"enum in add2.add.add.add\">",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   401
                    "<a href=\"add3/Add.ADD.html\" title=\"enum in add3\">",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   402
                    "<a href=\"add3/add/Add.ADD.html\" title=\"enum in add3.add\">",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   403
                    "<a href=\"add3/add/add/Add.ADD.html\" title=\"enum in add3.add.add\">",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   404
                    "<a href=\"add3/add/add/add/Add.ADD.html\" title=\"enum in add3.add.add.add\">");
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   405
        }
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   406
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   407
        void emitFile(String pkgname, String clsname, ListOrder order) throws IOException {
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   408
            File srcDir = new File("src");
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   409
            File outDir = pkgname == null
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   410
                    ? srcDir
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   411
                    : new File(srcDir, pkgname.replace(".", File.separator));
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   412
            File outFile = new File(outDir, clsname + ".java");
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   413
            outDir.mkdirs();
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   414
            List<String> scratch = new ArrayList<>(Arrays.asList(contents));
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   415
            switch (order) {
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   416
                case SHUFFLE:
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   417
                    Collections.shuffle(scratch);
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   418
                    break;
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   419
                case REVERSE:
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   420
                    Collections.reverse(scratch);
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   421
                    break;
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   422
                default:
25004
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   423
                // leave list as-is
42000
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   424
            }
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   425
            // insert the header
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   426
            scratch.add(0, "public class " + clsname + " {");
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   427
            if (pkgname != null) {
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   428
                scratch.add(0, "package " + pkgname + ";");
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   429
            }
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   430
            // append the footer
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   431
            scratch.add("}");
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   432
            Files.write(outFile.toPath(), scratch, CREATE, TRUNCATE_EXISTING);
25004
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   433
        }
42000
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   434
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   435
        String[] composeTestVectors() {
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   436
            List<String> testList = new ArrayList<>();
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   437
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   438
            for (String x : expectedEnumOrdering) {
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   439
                testList.add(x.replace("REPLACE_ME", "&lt;Unnamed&gt;"));
43570
c7b68caf3ab4 8169813: The index pages are sorted in a confusing manner
bpatel
parents: 42000
diff changeset
   440
            }
c7b68caf3ab4 8169813: The index pages are sorted in a confusing manner
bpatel
parents: 42000
diff changeset
   441
            for (int i = 0; i < MAX_PACKAGES; i++) {
c7b68caf3ab4 8169813: The index pages are sorted in a confusing manner
bpatel
parents: 42000
diff changeset
   442
                String wpkg = "add" + i;
c7b68caf3ab4 8169813: The index pages are sorted in a confusing manner
bpatel
parents: 42000
diff changeset
   443
                for (String x : expectedEnumOrdering) {
c7b68caf3ab4 8169813: The index pages are sorted in a confusing manner
bpatel
parents: 42000
diff changeset
   444
                    testList.add(wpkg + "/" + x.replace("REPLACE_ME", wpkg));
c7b68caf3ab4 8169813: The index pages are sorted in a confusing manner
bpatel
parents: 42000
diff changeset
   445
                }
c7b68caf3ab4 8169813: The index pages are sorted in a confusing manner
bpatel
parents: 42000
diff changeset
   446
                String dpkg = wpkg;
c7b68caf3ab4 8169813: The index pages are sorted in a confusing manner
bpatel
parents: 42000
diff changeset
   447
                for (int j = 1; j < MAX_SUBPACKAGES_DEPTH; j++) {
c7b68caf3ab4 8169813: The index pages are sorted in a confusing manner
bpatel
parents: 42000
diff changeset
   448
                    dpkg = dpkg + "/" + "add";
c7b68caf3ab4 8169813: The index pages are sorted in a confusing manner
bpatel
parents: 42000
diff changeset
   449
                    for (String x : expectedEnumOrdering) {
42000
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   450
                        testList.add(dpkg + "/" + x.replace("REPLACE_ME", pathToPackage(dpkg)));
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   451
                    }
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   452
                }
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   453
            }
25004
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   454
42000
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   455
            for (String x : expectedMethodOrdering) {
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   456
                testList.add(x);
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   457
                for (int i = 0; i < MAX_PACKAGES; i++) {
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   458
                    String wpkg = "add" + i;
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   459
                    testList.add(wpkg + "/" + x);
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   460
                    String dpkg = wpkg;
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   461
                    for (int j = 1; j < MAX_SUBPACKAGES_DEPTH; j++) {
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   462
                        dpkg = dpkg + "/" + "add";
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   463
                        testList.add(dpkg + "/" + x);
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   464
                    }
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   465
                }
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   466
            }
43570
c7b68caf3ab4 8169813: The index pages are sorted in a confusing manner
bpatel
parents: 42000
diff changeset
   467
            testList.addAll(Arrays.asList(expectedPackageOrdering));
c7b68caf3ab4 8169813: The index pages are sorted in a confusing manner
bpatel
parents: 42000
diff changeset
   468
            testList.addAll(Arrays.asList(expectedFieldOrdering));
42000
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   469
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   470
            return testList.toArray(new String[testList.size()]);
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   471
        }
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   472
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   473
        String pathToPackage(String in) {
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   474
            return in.replace("/", ".");
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   475
        }
24220
eb213562268d 8039410: [javadoc] fix class-use items to be deterministic and index ordering
ksrini
parents:
diff changeset
   476
    }
25004
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   477
53097
2e82ca64b25d 8215516: Move JavadocTester to a named package
jjg
parents: 50895
diff changeset
   478
    class IndexTypeClusteringTest {
37752
4243173b58db 8155061: javadoc incorrectly sorted items in All Classes list and Index files
ksrini
parents: 36526
diff changeset
   479
42000
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   480
        void run() {
53097
2e82ca64b25d 8215516: Move JavadocTester to a named package
jjg
parents: 50895
diff changeset
   481
            javadoc("-d", "out-3",
2e82ca64b25d 8215516: Move JavadocTester to a named package
jjg
parents: 50895
diff changeset
   482
                    "-sourcepath", testSrc("src-2"),
42000
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   483
                    "-use",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   484
                    "a",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   485
                    "b",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   486
                    "e",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   487
                    "something");
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   488
53097
2e82ca64b25d 8215516: Move JavadocTester to a named package
jjg
parents: 50895
diff changeset
   489
            checkExit(Exit.OK);
37752
4243173b58db 8155061: javadoc incorrectly sorted items in All Classes list and Index files
ksrini
parents: 36526
diff changeset
   490
53097
2e82ca64b25d 8215516: Move JavadocTester to a named package
jjg
parents: 50895
diff changeset
   491
            checkOrder("index-all.html",
42000
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   492
                    "something</a> - package something</dt>",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   493
                    "something</span></a> - Class in",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   494
                    "something</span></a> - Enum in",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   495
                    "something</span></a> - Interface in",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   496
                    "something</span></a> - Annotation Type in",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   497
                    "something</a></span> - Variable in class",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   498
                    "something()</a></span> - Constructor",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   499
                    "something()</a></span> - Method in class a.<a href=\"a/A.html\"",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   500
                    "something()</a></span> - Method in class a.<a href=\"a/something.html\"",
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   501
                    "something()</a></span> - Method in class something.<a href=\"something/J.html\"");
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   502
        }
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   503
    }
25449
3c14a2e16bd6 8049393: [javadoc] parameters are not sorted correctly
ksrini
parents: 25300
diff changeset
   504
53097
2e82ca64b25d 8215516: Move JavadocTester to a named package
jjg
parents: 50895
diff changeset
   505
    class TypeElementMemberOrderingTest {
37752
4243173b58db 8155061: javadoc incorrectly sorted items in All Classes list and Index files
ksrini
parents: 36526
diff changeset
   506
42000
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   507
        void run() {
53097
2e82ca64b25d 8215516: Move JavadocTester to a named package
jjg
parents: 50895
diff changeset
   508
            javadoc("-d", "out-5",
42000
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   509
                    "-javafx",
49879
601277b1d582 8025091: VisibleMemberMap.java possible performance improvements
ksrini
parents: 49139
diff changeset
   510
                    "--disable-javafx-strict-checks",
53097
2e82ca64b25d 8215516: Move JavadocTester to a named package
jjg
parents: 50895
diff changeset
   511
                    "-sourcepath", testSrc(new File(".").getPath()),
42000
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   512
                    "pkg5"
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   513
            );
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   514
53097
2e82ca64b25d 8215516: Move JavadocTester to a named package
jjg
parents: 50895
diff changeset
   515
            checkExit(Exit.OK);
37752
4243173b58db 8155061: javadoc incorrectly sorted items in All Classes list and Index files
ksrini
parents: 36526
diff changeset
   516
53097
2e82ca64b25d 8215516: Move JavadocTester to a named package
jjg
parents: 50895
diff changeset
   517
            checkOrder("pkg5/AnnoFieldTest.html",
54958
55bfc2eee3ab 8223733: "Detail" in headings should be "Details"
pmuthuswamy
parents: 54350
diff changeset
   518
                    "<h2>Field Details</h2>",
55197
0ca8e495bbba 8214126: Method signatures not formatted correctly in browser
hannesw
parents: 54958
diff changeset
   519
                    "<div class=\"memberSignature\"><span class=\"modifiers\">static final</span>&nbsp;"
0ca8e495bbba 8214126: Method signatures not formatted correctly in browser
hannesw
parents: 54958
diff changeset
   520
                    + "<span class=\"returnType\">int</span>&nbsp;<span class=\"memberName\">one</span></div>",
0ca8e495bbba 8214126: Method signatures not formatted correctly in browser
hannesw
parents: 54958
diff changeset
   521
                    "<div class=\"memberSignature\"><span class=\"modifiers\">static final</span>&nbsp;"
0ca8e495bbba 8214126: Method signatures not formatted correctly in browser
hannesw
parents: 54958
diff changeset
   522
                    + "<span class=\"returnType\">int</span>&nbsp;<span class=\"memberName\">two</span></div>",
0ca8e495bbba 8214126: Method signatures not formatted correctly in browser
hannesw
parents: 54958
diff changeset
   523
                    "<div class=\"memberSignature\"><span class=\"modifiers\">static final</span>&nbsp;"
0ca8e495bbba 8214126: Method signatures not formatted correctly in browser
hannesw
parents: 54958
diff changeset
   524
                    + "<span class=\"returnType\">int</span>&nbsp;<span class=\"memberName\">three</span></div>",
0ca8e495bbba 8214126: Method signatures not formatted correctly in browser
hannesw
parents: 54958
diff changeset
   525
                    "<div class=\"memberSignature\"><span class=\"modifiers\">static final</span>&nbsp;"
0ca8e495bbba 8214126: Method signatures not formatted correctly in browser
hannesw
parents: 54958
diff changeset
   526
                    + "<span class=\"returnType\">int</span>&nbsp;<span class=\"memberName\">four</span></div>");
37752
4243173b58db 8155061: javadoc incorrectly sorted items in All Classes list and Index files
ksrini
parents: 36526
diff changeset
   527
53097
2e82ca64b25d 8215516: Move JavadocTester to a named package
jjg
parents: 50895
diff changeset
   528
            checkOrder("pkg5/AnnoOptionalTest.html",
53991
786825220790 8219801: Pages do not have <h1>
jjg
parents: 53883
diff changeset
   529
                    "<h2>Optional Element Summary</h2>",
49139
771616d26ca1 8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents: 48654
diff changeset
   530
                    "<a href=\"#four()\">four</a>",
771616d26ca1 8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents: 48654
diff changeset
   531
                    "<a href=\"#one()\">one</a>",
771616d26ca1 8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents: 48654
diff changeset
   532
                    "<a href=\"#three()\">three</a>",
771616d26ca1 8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents: 48654
diff changeset
   533
                    "<a href=\"#two()\">two</a>",
54958
55bfc2eee3ab 8223733: "Detail" in headings should be "Details"
pmuthuswamy
parents: 54350
diff changeset
   534
                    "<h2>Element Details</h2>",
55339
0530705ca300 8223364: Bad placement of anchor relative to header
hannesw
parents: 55197
diff changeset
   535
                    "<h3><a id=\"one()\">one</a></h3>",
0530705ca300 8223364: Bad placement of anchor relative to header
hannesw
parents: 55197
diff changeset
   536
                    "<h3><a id=\"two()\">two</a></h3>",
0530705ca300 8223364: Bad placement of anchor relative to header
hannesw
parents: 55197
diff changeset
   537
                    "<h3><a id=\"three()\">three</a></h3>",
0530705ca300 8223364: Bad placement of anchor relative to header
hannesw
parents: 55197
diff changeset
   538
                    "<h3><a id=\"four()\">four</a></h3>");
37752
4243173b58db 8155061: javadoc incorrectly sorted items in All Classes list and Index files
ksrini
parents: 36526
diff changeset
   539
53097
2e82ca64b25d 8215516: Move JavadocTester to a named package
jjg
parents: 50895
diff changeset
   540
            checkOrder("pkg5/AnnoRequiredTest.html",
53991
786825220790 8219801: Pages do not have <h1>
jjg
parents: 53883
diff changeset
   541
                    "<h2>Required Element Summary</h2>",
49139
771616d26ca1 8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents: 48654
diff changeset
   542
                    "<a href=\"#four()\">four</a>",
771616d26ca1 8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents: 48654
diff changeset
   543
                    "<a href=\"#one()\">one</a>",
771616d26ca1 8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents: 48654
diff changeset
   544
                    "<a href=\"#three()\">three</a>",
771616d26ca1 8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents: 48654
diff changeset
   545
                    "<a href=\"#two()\">two</a>",
54958
55bfc2eee3ab 8223733: "Detail" in headings should be "Details"
pmuthuswamy
parents: 54350
diff changeset
   546
                    "<h2>Element Details</h2>",
55339
0530705ca300 8223364: Bad placement of anchor relative to header
hannesw
parents: 55197
diff changeset
   547
                    "<h3><a id=\"one()\">one</a></h3>",
0530705ca300 8223364: Bad placement of anchor relative to header
hannesw
parents: 55197
diff changeset
   548
                    "<h3><a id=\"two()\">two</a></h3>",
0530705ca300 8223364: Bad placement of anchor relative to header
hannesw
parents: 55197
diff changeset
   549
                    "<h3><a id=\"three()\">three</a></h3>",
0530705ca300 8223364: Bad placement of anchor relative to header
hannesw
parents: 55197
diff changeset
   550
                    "<h3><a id=\"four()\">four</a></h3>");
37752
4243173b58db 8155061: javadoc incorrectly sorted items in All Classes list and Index files
ksrini
parents: 36526
diff changeset
   551
53097
2e82ca64b25d 8215516: Move JavadocTester to a named package
jjg
parents: 50895
diff changeset
   552
            checkOrder("pkg5/CtorTest.html",
53991
786825220790 8219801: Pages do not have <h1>
jjg
parents: 53883
diff changeset
   553
                    "<h2>Constructor Summary</h2>",
49139
771616d26ca1 8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents: 48654
diff changeset
   554
                    "<a href=\"#%3Cinit%3E(int)\"",
771616d26ca1 8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents: 48654
diff changeset
   555
                    "<a href=\"#%3Cinit%3E(int,int)\"",
771616d26ca1 8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents: 48654
diff changeset
   556
                    "<a href=\"#%3Cinit%3E(int,int,int)\"",
771616d26ca1 8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents: 48654
diff changeset
   557
                    "<a href=\"#%3Cinit%3E(int,int,int,int)\"",
54958
55bfc2eee3ab 8223733: "Detail" in headings should be "Details"
pmuthuswamy
parents: 54350
diff changeset
   558
                    "<h2>Constructor Details</h2>",
49139
771616d26ca1 8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents: 48654
diff changeset
   559
                    "<a id=\"&lt;init&gt;(int,int,int,int)\">",
771616d26ca1 8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents: 48654
diff changeset
   560
                    "<a id=\"&lt;init&gt;(int,int,int)\">",
771616d26ca1 8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents: 48654
diff changeset
   561
                    "<a id=\"&lt;init&gt;(int,int)\">",
771616d26ca1 8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents: 48654
diff changeset
   562
                    "<a id=\"&lt;init&gt;(int)\">");
42000
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   563
53097
2e82ca64b25d 8215516: Move JavadocTester to a named package
jjg
parents: 50895
diff changeset
   564
            checkOrder("pkg5/EnumTest.html",
53991
786825220790 8219801: Pages do not have <h1>
jjg
parents: 53883
diff changeset
   565
                    "<h2>Enum Constant Summary</h2>",
48654
36f58bd6269f 8195796: Reduce the size of relative URLs in generated docs
jjg
parents: 47216
diff changeset
   566
                    "<a href=\"#FOUR\">FOUR</a>",
36f58bd6269f 8195796: Reduce the size of relative URLs in generated docs
jjg
parents: 47216
diff changeset
   567
                    "<a href=\"#ONE\">ONE</a>",
36f58bd6269f 8195796: Reduce the size of relative URLs in generated docs
jjg
parents: 47216
diff changeset
   568
                    "<a href=\"#THREE\">THREE</a>",
36f58bd6269f 8195796: Reduce the size of relative URLs in generated docs
jjg
parents: 47216
diff changeset
   569
                    "<a href=\"#TWO\">TWO</a>",
54958
55bfc2eee3ab 8223733: "Detail" in headings should be "Details"
pmuthuswamy
parents: 54350
diff changeset
   570
                    "<h2>Enum Constant Details</h2>",
55339
0530705ca300 8223364: Bad placement of anchor relative to header
hannesw
parents: 55197
diff changeset
   571
                    "<h3><a id=\"ONE\">ONE</a></h3>",
0530705ca300 8223364: Bad placement of anchor relative to header
hannesw
parents: 55197
diff changeset
   572
                    "<h3><a id=\"TWO\">TWO</a></h3>",
0530705ca300 8223364: Bad placement of anchor relative to header
hannesw
parents: 55197
diff changeset
   573
                    "<h3><a id=\"THREE\">THREE</a></h3>",
0530705ca300 8223364: Bad placement of anchor relative to header
hannesw
parents: 55197
diff changeset
   574
                    "<h3><a id=\"FOUR\">FOUR</a></h3>");
37752
4243173b58db 8155061: javadoc incorrectly sorted items in All Classes list and Index files
ksrini
parents: 36526
diff changeset
   575
53097
2e82ca64b25d 8215516: Move JavadocTester to a named package
jjg
parents: 50895
diff changeset
   576
            checkOrder("pkg5/FieldTest.html",
53991
786825220790 8219801: Pages do not have <h1>
jjg
parents: 53883
diff changeset
   577
                    "<h2>Field Summary</h2>",
48654
36f58bd6269f 8195796: Reduce the size of relative URLs in generated docs
jjg
parents: 47216
diff changeset
   578
                    "<a href=\"#four\">four</a>",
36f58bd6269f 8195796: Reduce the size of relative URLs in generated docs
jjg
parents: 47216
diff changeset
   579
                    "<a href=\"#one\">one</a>",
36f58bd6269f 8195796: Reduce the size of relative URLs in generated docs
jjg
parents: 47216
diff changeset
   580
                    "<a href=\"#three\">three</a>",
36f58bd6269f 8195796: Reduce the size of relative URLs in generated docs
jjg
parents: 47216
diff changeset
   581
                    "<a href=\"#two\">two</a>",
54958
55bfc2eee3ab 8223733: "Detail" in headings should be "Details"
pmuthuswamy
parents: 54350
diff changeset
   582
                    "<h2>Field Details</h2>",
55339
0530705ca300 8223364: Bad placement of anchor relative to header
hannesw
parents: 55197
diff changeset
   583
                    "<h3><a id=\"one\">one</a></h3>",
0530705ca300 8223364: Bad placement of anchor relative to header
hannesw
parents: 55197
diff changeset
   584
                    "<h3><a id=\"two\">two</a></h3>",
0530705ca300 8223364: Bad placement of anchor relative to header
hannesw
parents: 55197
diff changeset
   585
                    "<h3><a id=\"three\">three</a></h3>",
0530705ca300 8223364: Bad placement of anchor relative to header
hannesw
parents: 55197
diff changeset
   586
                    "<h3><a id=\"four\">four</a></h3>");
42000
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   587
53097
2e82ca64b25d 8215516: Move JavadocTester to a named package
jjg
parents: 50895
diff changeset
   588
            checkOrder("pkg5/IntfTest.html",
53991
786825220790 8219801: Pages do not have <h1>
jjg
parents: 53883
diff changeset
   589
                    "<h2>Method Summary</h2>",
49139
771616d26ca1 8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents: 48654
diff changeset
   590
                    "<a href=\"#four()\">four</a>",
771616d26ca1 8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents: 48654
diff changeset
   591
                    "<a href=\"#one()\">one</a>",
771616d26ca1 8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents: 48654
diff changeset
   592
                    "<a href=\"#three()\">three</a>",
771616d26ca1 8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents: 48654
diff changeset
   593
                    "<a href=\"#two()\">two</a>",
54958
55bfc2eee3ab 8223733: "Detail" in headings should be "Details"
pmuthuswamy
parents: 54350
diff changeset
   594
                    "<h2>Method Details</h2>",
55339
0530705ca300 8223364: Bad placement of anchor relative to header
hannesw
parents: 55197
diff changeset
   595
                    "<h3><a id=\"one()\">one</a></h3>",
0530705ca300 8223364: Bad placement of anchor relative to header
hannesw
parents: 55197
diff changeset
   596
                    "<h3><a id=\"two()\">two</a></h3>",
0530705ca300 8223364: Bad placement of anchor relative to header
hannesw
parents: 55197
diff changeset
   597
                    "<h3><a id=\"three()\">three</a></h3>",
0530705ca300 8223364: Bad placement of anchor relative to header
hannesw
parents: 55197
diff changeset
   598
                    "<h3><a id=\"four()\">four</a></h3>");
37752
4243173b58db 8155061: javadoc incorrectly sorted items in All Classes list and Index files
ksrini
parents: 36526
diff changeset
   599
53097
2e82ca64b25d 8215516: Move JavadocTester to a named package
jjg
parents: 50895
diff changeset
   600
            checkOrder("pkg5/MethodTest.html",
53991
786825220790 8219801: Pages do not have <h1>
jjg
parents: 53883
diff changeset
   601
                    "<h2>Method Summary</h2>",
49139
771616d26ca1 8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents: 48654
diff changeset
   602
                    "<a href=\"#four()\">four</a>",
771616d26ca1 8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents: 48654
diff changeset
   603
                    "<a href=\"#one()\">one</a>",
771616d26ca1 8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents: 48654
diff changeset
   604
                    "<a href=\"#three()\">three</a>",
771616d26ca1 8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents: 48654
diff changeset
   605
                    "<a href=\"#two()\">two</a>",
54958
55bfc2eee3ab 8223733: "Detail" in headings should be "Details"
pmuthuswamy
parents: 54350
diff changeset
   606
                    "<h2>Method Details</h2>",
55339
0530705ca300 8223364: Bad placement of anchor relative to header
hannesw
parents: 55197
diff changeset
   607
                    "<h3><a id=\"one()\">one</a></h3>",
0530705ca300 8223364: Bad placement of anchor relative to header
hannesw
parents: 55197
diff changeset
   608
                    "<h3><a id=\"two()\">two</a></h3>",
0530705ca300 8223364: Bad placement of anchor relative to header
hannesw
parents: 55197
diff changeset
   609
                    "<h3><a id=\"three()\">three</a></h3>",
0530705ca300 8223364: Bad placement of anchor relative to header
hannesw
parents: 55197
diff changeset
   610
                    "<h3><a id=\"four()\">four</a></h3>");
37752
4243173b58db 8155061: javadoc incorrectly sorted items in All Classes list and Index files
ksrini
parents: 36526
diff changeset
   611
53097
2e82ca64b25d 8215516: Move JavadocTester to a named package
jjg
parents: 50895
diff changeset
   612
            checkOrder("pkg5/PropertyTest.html",
53991
786825220790 8219801: Pages do not have <h1>
jjg
parents: 53883
diff changeset
   613
                    "<h2>Property Summary</h2>",
48654
36f58bd6269f 8195796: Reduce the size of relative URLs in generated docs
jjg
parents: 47216
diff changeset
   614
                    "<a href=\"#fourProperty\">four</a>",
36f58bd6269f 8195796: Reduce the size of relative URLs in generated docs
jjg
parents: 47216
diff changeset
   615
                    "<a href=\"#oneProperty\">one</a>",
36f58bd6269f 8195796: Reduce the size of relative URLs in generated docs
jjg
parents: 47216
diff changeset
   616
                    "<a href=\"#threeProperty\">three</a>",
36f58bd6269f 8195796: Reduce the size of relative URLs in generated docs
jjg
parents: 47216
diff changeset
   617
                    "<a href=\"#twoProperty\">two</a>",
54958
55bfc2eee3ab 8223733: "Detail" in headings should be "Details"
pmuthuswamy
parents: 54350
diff changeset
   618
                    "<h2>Property Details</h2>",
55339
0530705ca300 8223364: Bad placement of anchor relative to header
hannesw
parents: 55197
diff changeset
   619
                    "<h3><a id=\"oneProperty()\">oneProperty</a></h3>",
0530705ca300 8223364: Bad placement of anchor relative to header
hannesw
parents: 55197
diff changeset
   620
                    "<h3><a id=\"twoProperty()\">twoProperty</a></h3>",
0530705ca300 8223364: Bad placement of anchor relative to header
hannesw
parents: 55197
diff changeset
   621
                    "<h3><a id=\"threeProperty()\">threeProperty</a></h3>",
0530705ca300 8223364: Bad placement of anchor relative to header
hannesw
parents: 55197
diff changeset
   622
                    "<h3><a id=\"fourProperty()\">fourProperty</a></h3>");
49139
771616d26ca1 8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents: 48654
diff changeset
   623
42000
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   624
        }
8b7412f7eecd 8167967: javadoc should identify the ordinal value of enum constants
ksrini
parents: 40511
diff changeset
   625
    }
24220
eb213562268d 8039410: [javadoc] fix class-use items to be deterministic and index ordering
ksrini
parents:
diff changeset
   626
}