langtools/test/com/sun/javadoc/testOrdering/TestOrdering.java
author ksrini
Sun, 29 Jun 2014 17:13:55 -0700
changeset 25449 3c14a2e16bd6
parent 25300 3b8a5067fe29
child 26270 a3635e6d3d78
permissions -rw-r--r--
8049393: [javadoc] parameters are not sorted correctly Reviewed-by: jjg
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
/*
eb213562268d 8039410: [javadoc] fix class-use items to be deterministic and index ordering
ksrini
parents:
diff changeset
     2
 * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
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
25449
3c14a2e16bd6 8049393: [javadoc] parameters are not sorted correctly
ksrini
parents: 25300
diff changeset
    26
 * @bug 8039410 8042601 8042829 8049393
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
eb213562268d 8039410: [javadoc] fix class-use items to be deterministic and index ordering
ksrini
parents:
diff changeset
    28
 * @author ksrini
eb213562268d 8039410: [javadoc] fix class-use items to be deterministic and index ordering
ksrini
parents:
diff changeset
    29
 * @library ../lib/
eb213562268d 8039410: [javadoc] fix class-use items to be deterministic and index ordering
ksrini
parents:
diff changeset
    30
 * @build JavadocTester
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
24399
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24394
diff changeset
    44
public class TestOrdering extends JavadocTester {
24220
eb213562268d 8039410: [javadoc] fix class-use items to be deterministic and index ordering
ksrini
parents:
diff changeset
    45
eb213562268d 8039410: [javadoc] fix class-use items to be deterministic and index ordering
ksrini
parents:
diff changeset
    46
    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
    47
        TestOrdering tester = new TestOrdering();
24399
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24394
diff changeset
    48
        tester.runTests();
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24394
diff changeset
    49
    }
24220
eb213562268d 8039410: [javadoc] fix class-use items to be deterministic and index ordering
ksrini
parents:
diff changeset
    50
24399
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24394
diff changeset
    51
    @Test
25004
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
    52
    void testUnnamedPackagesForClassUse() {
24399
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24394
diff changeset
    53
        javadoc("-d", "out",
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24394
diff changeset
    54
                "-sourcepath", testSrc,
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24394
diff changeset
    55
                "-use",
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24394
diff changeset
    56
                testSrc("C.java"), testSrc("UsedInC.java"));
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24394
diff changeset
    57
        checkExit(Exit.OK);
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24394
diff changeset
    58
        checkExecutableMemberOrdering("class-use/UsedInC.html");
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24394
diff changeset
    59
    }
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24394
diff changeset
    60
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24394
diff changeset
    61
    @Test
25004
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
    62
    void testNamedPackagesForClassUse() {
24399
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24394
diff changeset
    63
        javadoc("-d", "out-1",
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24394
diff changeset
    64
                "-sourcepath", testSrc,
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24394
diff changeset
    65
                "-use",
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24394
diff changeset
    66
                "pkg1");
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24394
diff changeset
    67
        checkExit(Exit.OK);
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24394
diff changeset
    68
        checkClassUseOrdering("pkg1/class-use/UsedClass.html");
25449
3c14a2e16bd6 8049393: [javadoc] parameters are not sorted correctly
ksrini
parents: 25300
diff changeset
    69
        checkOrder("pkg1/class-use/UsedClass.html", expectedClassUseMethodOrdering);
3c14a2e16bd6 8049393: [javadoc] parameters are not sorted correctly
ksrini
parents: 25300
diff changeset
    70
        checkOrder("pkg1/class-use/UsedClass.html", expectedClassUseWithTypeParams);
3c14a2e16bd6 8049393: [javadoc] parameters are not sorted correctly
ksrini
parents: 25300
diff changeset
    71
        checkOrder("pkg1/class-use/UsedClass.html", expectedInnerClassContructors);
24220
eb213562268d 8039410: [javadoc] fix class-use items to be deterministic and index ordering
ksrini
parents:
diff changeset
    72
    }
eb213562268d 8039410: [javadoc] fix class-use items to be deterministic and index ordering
ksrini
parents:
diff changeset
    73
25004
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
    74
    enum ListOrder { NONE, REVERSE, SHUFFLE };
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
    75
    /*
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
    76
     * By default we do not shuffle the input list, in order to keep the list deterministic,
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
    77
     * and the test predictable. However, we can turn on the stress mode, by setting the following
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
    78
     * property if required.
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
    79
     */
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
    80
    static final ListOrder STRESS_MODE = Boolean.getBoolean("TestOrder.STRESS")
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
    81
            ? ListOrder.SHUFFLE
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
    82
            : ListOrder.REVERSE;
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
    83
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
    84
    /*
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
    85
     * Controls the number of sibling packages,  pkg0, pkg1, pkg2, .....
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
    86
     */
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
    87
    static final int MAX_PACKAGES = 4;
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
    88
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
    89
    /*
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
    90
     * Controls the number of children packages, pkg0, pkg0.pkg, pkg0.pkg.pkg, .....
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
    91
     * Note: having too long a depth (> 256 chars on Windows), will likely lead to
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
    92
     * cause problems with automated build and test systems.
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
    93
     */
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
    94
    static final int MAX_SUBPACKAGES_DEPTH = 4;
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
    95
    @Test
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
    96
    void testIndexOrdering() throws IOException {
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
    97
        final String clsname = "Add";
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
    98
        List<String> cmdArgs = new ArrayList();
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
    99
        cmdArgs.add("-d");
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   100
        cmdArgs.add("out-2");
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   101
        cmdArgs.add("-sourcepath");
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   102
        cmdArgs.add("src");
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   103
        cmdArgs.add("-package");
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   104
        System.out.println("STRESS_MODE: " + STRESS_MODE);
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   105
        emitFile(null, clsname, STRESS_MODE);
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   106
        for (int width = 0 ; width < MAX_PACKAGES ; width++) {
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   107
            String wpkgname = "add" + width;
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   108
            String dpkgname = wpkgname;
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   109
            emitFile(wpkgname, clsname, ListOrder.NONE); // list as-is
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   110
            cmdArgs.add(wpkgname);
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   111
            for (int depth = 1 ; depth < MAX_SUBPACKAGES_DEPTH ; depth++) {
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   112
                dpkgname = dpkgname + ".add";
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   113
                emitFile(dpkgname, clsname, STRESS_MODE);
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   114
                cmdArgs.add(dpkgname);
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   115
            }
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   116
        }
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   117
        File srcDir = new File(new File("."), "src");
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   118
        cmdArgs.add(new File(srcDir, clsname + ".java").getPath());
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   119
        javadoc(cmdArgs.toArray(new String[cmdArgs.size()]));
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   120
        checkExit(Exit.OK);
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   121
        checkOrder("index-all.html", composeTestVectors());
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   122
    }
25300
3b8a5067fe29 8047162: [javadoc] index files are non deterministic
ksrini
parents: 25004
diff changeset
   123
3b8a5067fe29 8047162: [javadoc] index files are non deterministic
ksrini
parents: 25004
diff changeset
   124
    @Test
3b8a5067fe29 8047162: [javadoc] index files are non deterministic
ksrini
parents: 25004
diff changeset
   125
    void testIndexTypeClustering() {
3b8a5067fe29 8047162: [javadoc] index files are non deterministic
ksrini
parents: 25004
diff changeset
   126
        javadoc("-d", "out-3",
3b8a5067fe29 8047162: [javadoc] index files are non deterministic
ksrini
parents: 25004
diff changeset
   127
                "-sourcepath", testSrc("src-2"),
3b8a5067fe29 8047162: [javadoc] index files are non deterministic
ksrini
parents: 25004
diff changeset
   128
                "-use",
3b8a5067fe29 8047162: [javadoc] index files are non deterministic
ksrini
parents: 25004
diff changeset
   129
                "a",
3b8a5067fe29 8047162: [javadoc] index files are non deterministic
ksrini
parents: 25004
diff changeset
   130
                "b",
3b8a5067fe29 8047162: [javadoc] index files are non deterministic
ksrini
parents: 25004
diff changeset
   131
                "e",
3b8a5067fe29 8047162: [javadoc] index files are non deterministic
ksrini
parents: 25004
diff changeset
   132
                "something");
3b8a5067fe29 8047162: [javadoc] index files are non deterministic
ksrini
parents: 25004
diff changeset
   133
        checkOrder("index-all.html", typeTestVectors);
3b8a5067fe29 8047162: [javadoc] index files are non deterministic
ksrini
parents: 25004
diff changeset
   134
        checkExit(Exit.OK);
3b8a5067fe29 8047162: [javadoc] index files are non deterministic
ksrini
parents: 25004
diff changeset
   135
    }
3b8a5067fe29 8047162: [javadoc] index files are non deterministic
ksrini
parents: 25004
diff changeset
   136
    String[] typeTestVectors = {
3b8a5067fe29 8047162: [javadoc] index files are non deterministic
ksrini
parents: 25004
diff changeset
   137
        "something</a> - package something</dt>",
3b8a5067fe29 8047162: [javadoc] index files are non deterministic
ksrini
parents: 25004
diff changeset
   138
        "something</span></a> - Class in",
3b8a5067fe29 8047162: [javadoc] index files are non deterministic
ksrini
parents: 25004
diff changeset
   139
        "something</span></a> - Enum in",
3b8a5067fe29 8047162: [javadoc] index files are non deterministic
ksrini
parents: 25004
diff changeset
   140
        "something</span></a> - Interface in",
3b8a5067fe29 8047162: [javadoc] index files are non deterministic
ksrini
parents: 25004
diff changeset
   141
        "something</span></a> - Annotation Type in",
3b8a5067fe29 8047162: [javadoc] index files are non deterministic
ksrini
parents: 25004
diff changeset
   142
        "something</a></span> - Variable in class",
3b8a5067fe29 8047162: [javadoc] index files are non deterministic
ksrini
parents: 25004
diff changeset
   143
        "something()</a></span> - Constructor",
3b8a5067fe29 8047162: [javadoc] index files are non deterministic
ksrini
parents: 25004
diff changeset
   144
        "something()</a></span> - Method in class a.<a href=\"a/A.html\"",
3b8a5067fe29 8047162: [javadoc] index files are non deterministic
ksrini
parents: 25004
diff changeset
   145
        "something()</a></span> - Method in class a.<a href=\"a/something.html\"",
3b8a5067fe29 8047162: [javadoc] index files are non deterministic
ksrini
parents: 25004
diff changeset
   146
        "something()</a></span> - Method in class something.<a href=\"something/J.html\""
3b8a5067fe29 8047162: [javadoc] index files are non deterministic
ksrini
parents: 25004
diff changeset
   147
    };
25004
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   148
    String[] composeTestVectors() {
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   149
        List<String> testList = new ArrayList<>();
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   150
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   151
        for (String x : expectedMethodOrdering) {
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   152
            testList.add(x);
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   153
            for (int i = 0; i < MAX_PACKAGES; i++) {
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   154
                String wpkg = "add" + i;
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   155
                testList.add(wpkg + "/" + x);
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   156
                String dpkg = wpkg;
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   157
                for (int j = 1; j < MAX_SUBPACKAGES_DEPTH; j++) {
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   158
                    dpkg = dpkg + "/" + "add";
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   159
                    testList.add(dpkg + "/" + x);
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   160
                }
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   161
            }
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   162
        }
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   163
        for (String x : expectedEnumOrdering) {
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   164
            testList.add(x.replace("REPLACE_ME", "&lt;Unnamed&gt;"));
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   165
            for (int i = 0; i < MAX_PACKAGES; i++) {
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   166
                String wpkg = "add" + i;
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   167
                testList.add(wpkg + "/" + x.replace("REPLACE_ME", wpkg));
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   168
                String dpkg = wpkg;
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   169
                for (int j = 1; j < MAX_SUBPACKAGES_DEPTH; j++) {
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   170
                    dpkg = dpkg + "/" + "add";
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   171
                    testList.add(dpkg + "/" + x.replace("REPLACE_ME", pathToPackage(dpkg)));
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   172
                }
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   173
            }
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   174
        }
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   175
        testList.addAll(Arrays.asList(expectedFieldOrdering));
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   176
        return testList.toArray(new String[testList.size()]);
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   177
    }
24399
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24394
diff changeset
   178
    void checkExecutableMemberOrdering(String usePage) {
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24394
diff changeset
   179
        String contents = readFile(usePage);
24220
eb213562268d 8039410: [javadoc] fix class-use items to be deterministic and index ordering
ksrini
parents:
diff changeset
   180
        // check constructors
24399
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24394
diff changeset
   181
        checking("constructors");
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24394
diff changeset
   182
        int idx1 = contents.indexOf("C.html#C-UsedInC");
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24394
diff changeset
   183
        int idx2 = contents.indexOf("C.html#C-UsedInC-int");
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24394
diff changeset
   184
        int idx3 = contents.indexOf("C.html#C-UsedInC-java.lang.String");
24220
eb213562268d 8039410: [javadoc] fix class-use items to be deterministic and index ordering
ksrini
parents:
diff changeset
   185
        if (idx1 == -1 || idx2 == -1 || idx3 == -1) {
24399
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24394
diff changeset
   186
            failed("ctor strings not found");
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24394
diff changeset
   187
        } else if (idx1 > idx2 || idx2 > idx3 || idx1 > idx3) {
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24394
diff changeset
   188
            failed("ctor strings are out of order");
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24394
diff changeset
   189
        } else
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24394
diff changeset
   190
            passed("ctor strings are in order");
24220
eb213562268d 8039410: [javadoc] fix class-use items to be deterministic and index ordering
ksrini
parents:
diff changeset
   191
eb213562268d 8039410: [javadoc] fix class-use items to be deterministic and index ordering
ksrini
parents:
diff changeset
   192
        // check methods
24399
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24394
diff changeset
   193
        checking("methods");
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24394
diff changeset
   194
        idx1 = contents.indexOf("C.html#ymethod-int");
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24394
diff changeset
   195
        idx2 = contents.indexOf("C.html#ymethod-java.lang.String");
24220
eb213562268d 8039410: [javadoc] fix class-use items to be deterministic and index ordering
ksrini
parents:
diff changeset
   196
        if (idx1 == -1 || idx2 == -1) {
24399
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24394
diff changeset
   197
            failed("#ymethod strings not found");
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24394
diff changeset
   198
        } else if (idx1 > idx2) {
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24394
diff changeset
   199
            failed("#ymethod strings are out of order");
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24394
diff changeset
   200
        } else
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24394
diff changeset
   201
            passed("Executable Member Ordering: OK");
24220
eb213562268d 8039410: [javadoc] fix class-use items to be deterministic and index ordering
ksrini
parents:
diff changeset
   202
    }
eb213562268d 8039410: [javadoc] fix class-use items to be deterministic and index ordering
ksrini
parents:
diff changeset
   203
24399
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24394
diff changeset
   204
    void checkClassUseOrdering(String usePage) {
24220
eb213562268d 8039410: [javadoc] fix class-use items to be deterministic and index ordering
ksrini
parents:
diff changeset
   205
        checkClassUseOrdering(usePage, "pkg1/C#ITERATION#.html#zfield");
eb213562268d 8039410: [javadoc] fix class-use items to be deterministic and index ordering
ksrini
parents:
diff changeset
   206
        checkClassUseOrdering(usePage, "pkg1/C#ITERATION#.html#fieldInC#ITERATION#");
eb213562268d 8039410: [javadoc] fix class-use items to be deterministic and index ordering
ksrini
parents:
diff changeset
   207
        checkClassUseOrdering(usePage, "pkg1/C#ITERATION#.html#zmethod-pkg1.UsedClass");
eb213562268d 8039410: [javadoc] fix class-use items to be deterministic and index ordering
ksrini
parents:
diff changeset
   208
        checkClassUseOrdering(usePage, "pkg1/C#ITERATION#.html#methodInC#ITERATION#");
eb213562268d 8039410: [javadoc] fix class-use items to be deterministic and index ordering
ksrini
parents:
diff changeset
   209
    }
eb213562268d 8039410: [javadoc] fix class-use items to be deterministic and index ordering
ksrini
parents:
diff changeset
   210
24399
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24394
diff changeset
   211
    void checkClassUseOrdering(String usePage, String searchString) {
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24394
diff changeset
   212
        String contents = readFile(usePage);
24220
eb213562268d 8039410: [javadoc] fix class-use items to be deterministic and index ordering
ksrini
parents:
diff changeset
   213
        int lastidx = 0;
eb213562268d 8039410: [javadoc] fix class-use items to be deterministic and index ordering
ksrini
parents:
diff changeset
   214
        System.out.println("testing for " + searchString);
eb213562268d 8039410: [javadoc] fix class-use items to be deterministic and index ordering
ksrini
parents:
diff changeset
   215
        for (int i = 1; i < 5; i++) {
eb213562268d 8039410: [javadoc] fix class-use items to be deterministic and index ordering
ksrini
parents:
diff changeset
   216
            String s = searchString.replaceAll("#ITERATION#", Integer.toString(i));
24399
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24394
diff changeset
   217
            checking(s);
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24394
diff changeset
   218
            int idx = contents.indexOf(s);
24220
eb213562268d 8039410: [javadoc] fix class-use items to be deterministic and index ordering
ksrini
parents:
diff changeset
   219
            if (idx < lastidx) {
24399
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24394
diff changeset
   220
                failed(s + ", member ordering error, last:" + lastidx + ", got:" + idx);
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24394
diff changeset
   221
            } else {
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24394
diff changeset
   222
                passed("\tlast: " + lastidx + " got:" + idx);
24220
eb213562268d 8039410: [javadoc] fix class-use items to be deterministic and index ordering
ksrini
parents:
diff changeset
   223
            }
eb213562268d 8039410: [javadoc] fix class-use items to be deterministic and index ordering
ksrini
parents:
diff changeset
   224
            lastidx = idx;
eb213562268d 8039410: [javadoc] fix class-use items to be deterministic and index ordering
ksrini
parents:
diff changeset
   225
        }
eb213562268d 8039410: [javadoc] fix class-use items to be deterministic and index ordering
ksrini
parents:
diff changeset
   226
    }
eb213562268d 8039410: [javadoc] fix class-use items to be deterministic and index ordering
ksrini
parents:
diff changeset
   227
25004
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   228
    static String[] contents = {
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   229
        "public add ADDADD;",
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   230
        "public add AddAdd;",
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   231
        "public add addadd;",
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   232
        "public enum add {add, ADD, addd, ADDD};",
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   233
        "public enum ADD {ADD, add, addd, ADDD};",
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   234
        "public void   add(){}",
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   235
        "public void   add(double d){}",
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   236
        "public void   add(int i, float f){}",
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   237
        "public void   add(float f, int i){}",
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   238
        "public void   add(double d, byte b){}",
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   239
        "public Double add(Double d) {return (double) 22/7;}",
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   240
        "public double add(double d1, double d2) {return d1 + d2;}",
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   241
        "public double add(double d1, Double  d2) {return d1 + d2;}",
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   242
        "public Float  add(float f) {return (float) 22/7;}",
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   243
        "public void   add(int i){}",
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   244
        "public int    add(Integer i) {return 0;}"
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   245
    };
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   246
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   247
    void emitFile(String pkgname, String clsname, ListOrder order) throws IOException {
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   248
        File srcDir = new File("src");
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   249
        File outDir = pkgname == null
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   250
            ? srcDir
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   251
            : new File(srcDir, pkgname.replace(".", File.separator));
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   252
        File outFile = new File(outDir, clsname + ".java");
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   253
        outDir.mkdirs();
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   254
        List<String> scratch = new ArrayList<>(Arrays.asList(contents));
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   255
        switch (order) {
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   256
            case SHUFFLE:
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   257
                Collections.shuffle(scratch);
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   258
                break;
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   259
            case REVERSE:
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   260
                Collections.reverse(scratch);
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   261
                break;
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   262
            default:
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   263
                // leave list as-is
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   264
        }
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   265
        // insert the header
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   266
        scratch.add(0, "public class " + clsname + " {");
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   267
        if (pkgname != null) {
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   268
            scratch.add(0, "package " + pkgname + ";");
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   269
        }
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   270
        // append the footer
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   271
        scratch.add("}");
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   272
        Files.write(outFile.toPath(), scratch, CREATE, TRUNCATE_EXISTING);
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   273
    }
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   274
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   275
    String pathToPackage(String in) {
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   276
        return in.replace("/", ".");
24220
eb213562268d 8039410: [javadoc] fix class-use items to be deterministic and index ordering
ksrini
parents:
diff changeset
   277
    }
25004
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   278
25449
3c14a2e16bd6 8049393: [javadoc] parameters are not sorted correctly
ksrini
parents: 25300
diff changeset
   279
    final String expectedInnerClassContructors[] = {
3c14a2e16bd6 8049393: [javadoc] parameters are not sorted correctly
ksrini
parents: 25300
diff changeset
   280
        "../../pkg1/A.html#A-pkg1.UsedClass-",
3c14a2e16bd6 8049393: [javadoc] parameters are not sorted correctly
ksrini
parents: 25300
diff changeset
   281
        "../../pkg1/B.A.html#A-pkg1.UsedClass-",
3c14a2e16bd6 8049393: [javadoc] parameters are not sorted correctly
ksrini
parents: 25300
diff changeset
   282
        "../../pkg1/B.html#B-pkg1.UsedClass-",
3c14a2e16bd6 8049393: [javadoc] parameters are not sorted correctly
ksrini
parents: 25300
diff changeset
   283
        "../../pkg1/A.C.html#C-pkg1.UsedClass-java.lang.Object:A-",
3c14a2e16bd6 8049393: [javadoc] parameters are not sorted correctly
ksrini
parents: 25300
diff changeset
   284
        "../../pkg1/A.C.html#C-pkg1.UsedClass-java.util.Collection-",
3c14a2e16bd6 8049393: [javadoc] parameters are not sorted correctly
ksrini
parents: 25300
diff changeset
   285
        "../../pkg1/A.C.html#C-pkg1.UsedClass-java.util.List-"
3c14a2e16bd6 8049393: [javadoc] parameters are not sorted correctly
ksrini
parents: 25300
diff changeset
   286
    };
3c14a2e16bd6 8049393: [javadoc] parameters are not sorted correctly
ksrini
parents: 25300
diff changeset
   287
3c14a2e16bd6 8049393: [javadoc] parameters are not sorted correctly
ksrini
parents: 25300
diff changeset
   288
    final String expectedClassUseMethodOrdering[] = {
3c14a2e16bd6 8049393: [javadoc] parameters are not sorted correctly
ksrini
parents: 25300
diff changeset
   289
        "../../pkg1/MethodOrder.html#m--",
3c14a2e16bd6 8049393: [javadoc] parameters are not sorted correctly
ksrini
parents: 25300
diff changeset
   290
        "../../pkg1/MethodOrder.html#m-byte:A-",
3c14a2e16bd6 8049393: [javadoc] parameters are not sorted correctly
ksrini
parents: 25300
diff changeset
   291
        "../../pkg1/MethodOrder.html#m-double-",
3c14a2e16bd6 8049393: [javadoc] parameters are not sorted correctly
ksrini
parents: 25300
diff changeset
   292
        "../../pkg1/MethodOrder.html#m-double-double-",
3c14a2e16bd6 8049393: [javadoc] parameters are not sorted correctly
ksrini
parents: 25300
diff changeset
   293
        "../../pkg1/MethodOrder.html#m-double-java.lang.Double-",
3c14a2e16bd6 8049393: [javadoc] parameters are not sorted correctly
ksrini
parents: 25300
diff changeset
   294
        "../../pkg1/MethodOrder.html#m-int-",
3c14a2e16bd6 8049393: [javadoc] parameters are not sorted correctly
ksrini
parents: 25300
diff changeset
   295
        "../../pkg1/MethodOrder.html#m-int-int-",
3c14a2e16bd6 8049393: [javadoc] parameters are not sorted correctly
ksrini
parents: 25300
diff changeset
   296
        "../../pkg1/MethodOrder.html#m-int-java.lang.Integer-",
3c14a2e16bd6 8049393: [javadoc] parameters are not sorted correctly
ksrini
parents: 25300
diff changeset
   297
        "../../pkg1/MethodOrder.html#m-java.lang.Double-",
3c14a2e16bd6 8049393: [javadoc] parameters are not sorted correctly
ksrini
parents: 25300
diff changeset
   298
        "../../pkg1/MethodOrder.html#m-java.lang.Double-double-",
3c14a2e16bd6 8049393: [javadoc] parameters are not sorted correctly
ksrini
parents: 25300
diff changeset
   299
        "../../pkg1/MethodOrder.html#m-java.lang.Double-java.lang.Double-",
3c14a2e16bd6 8049393: [javadoc] parameters are not sorted correctly
ksrini
parents: 25300
diff changeset
   300
        "../../pkg1/MethodOrder.html#m-java.lang.Integer-",
3c14a2e16bd6 8049393: [javadoc] parameters are not sorted correctly
ksrini
parents: 25300
diff changeset
   301
        "../../pkg1/MethodOrder.html#m-java.lang.Integer-int-",
3c14a2e16bd6 8049393: [javadoc] parameters are not sorted correctly
ksrini
parents: 25300
diff changeset
   302
        "../../pkg1/MethodOrder.html#m-java.lang.Integer-java.lang.Integer-",
3c14a2e16bd6 8049393: [javadoc] parameters are not sorted correctly
ksrini
parents: 25300
diff changeset
   303
        "../../pkg1/MethodOrder.html#m-java.lang.Object:A-",
3c14a2e16bd6 8049393: [javadoc] parameters are not sorted correctly
ksrini
parents: 25300
diff changeset
   304
        "../../pkg1/MethodOrder.html#m-java.util.ArrayList-",
3c14a2e16bd6 8049393: [javadoc] parameters are not sorted correctly
ksrini
parents: 25300
diff changeset
   305
        "../../pkg1/MethodOrder.html#m-java.util.Collection-",
3c14a2e16bd6 8049393: [javadoc] parameters are not sorted correctly
ksrini
parents: 25300
diff changeset
   306
        "../../pkg1/MethodOrder.html#m-java.util.List-"
3c14a2e16bd6 8049393: [javadoc] parameters are not sorted correctly
ksrini
parents: 25300
diff changeset
   307
    };
3c14a2e16bd6 8049393: [javadoc] parameters are not sorted correctly
ksrini
parents: 25300
diff changeset
   308
    final String expectedClassUseWithTypeParams[] = {
3c14a2e16bd6 8049393: [javadoc] parameters are not sorted correctly
ksrini
parents: 25300
diff changeset
   309
        "../../pkg1/MethodOrder.html#tpm-pkg1.UsedClass-",
3c14a2e16bd6 8049393: [javadoc] parameters are not sorted correctly
ksrini
parents: 25300
diff changeset
   310
        "../../pkg1/MethodOrder.html#tpm-pkg1.UsedClass-pkg1.UsedClass-",
3c14a2e16bd6 8049393: [javadoc] parameters are not sorted correctly
ksrini
parents: 25300
diff changeset
   311
        "../../pkg1/MethodOrder.html#tpm-pkg1.UsedClass-pkg1.UsedClass:A-",
3c14a2e16bd6 8049393: [javadoc] parameters are not sorted correctly
ksrini
parents: 25300
diff changeset
   312
        "../../pkg1/MethodOrder.html#tpm-pkg1.UsedClass-java.lang.String-"
3c14a2e16bd6 8049393: [javadoc] parameters are not sorted correctly
ksrini
parents: 25300
diff changeset
   313
    };
25004
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   314
    final String expectedMethodOrdering[] = {
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   315
        "Add.html#add--",
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   316
        "Add.html#add-double-",
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   317
        "Add.html#add-double-byte-",
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   318
        "Add.html#add-double-double-",
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   319
        "Add.html#add-double-java.lang.Double-",
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   320
        "Add.html#add-float-",
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   321
        "Add.html#add-float-int-",
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   322
        "Add.html#add-int-",
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   323
        "Add.html#add-int-float-",
25449
3c14a2e16bd6 8049393: [javadoc] parameters are not sorted correctly
ksrini
parents: 25300
diff changeset
   324
        "Add.html#add-java.lang.Double-",
25004
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   325
        "Add.html#add-java.lang.Integer-"
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   326
    };
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   327
    final String expectedEnumOrdering[] = {
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   328
        "Add.add.html\" title=\"enum in REPLACE_ME\"",
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   329
        "Add.ADD.html\" title=\"enum in REPLACE_ME\""
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   330
    };
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   331
    final String expectedFieldOrdering[] = {
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   332
        "Add.html#addadd\"",
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   333
        "add0/add/add/add/Add.html#addadd\"",
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   334
        "add0/add/add/Add.html#addadd\"",
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   335
        "add0/add/Add.html#addadd\"",
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   336
        "add0/Add.html#addadd\"",
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   337
        "add1/add/add/add/Add.html#addadd\"",
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   338
        "add1/add/add/Add.html#addadd\"",
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   339
        "add1/add/Add.html#addadd\"",
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   340
        "add1/Add.html#addadd\"",
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   341
        "add2/add/add/add/Add.html#addadd\"",
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   342
        "add2/add/add/Add.html#addadd\"",
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   343
        "add2/add/Add.html#addadd\"",
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   344
        "add2/Add.html#addadd\"",
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   345
        "add3/add/add/add/Add.html#addadd\"",
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   346
        "add3/add/add/Add.html#addadd\"",
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   347
        "add3/add/Add.html#addadd\"",
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   348
        "add3/Add.html#addadd\"",
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   349
        "Add.html#AddAdd\"",
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   350
        "add0/add/add/add/Add.html#AddAdd\"",
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   351
        "add0/add/add/Add.html#AddAdd\"",
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   352
        "add0/add/Add.html#AddAdd\"",
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   353
        "add0/Add.html#AddAdd\"",
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   354
        "add1/add/add/add/Add.html#AddAdd\"",
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   355
        "add1/add/add/Add.html#AddAdd\"",
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   356
        "add1/add/Add.html#AddAdd\"",
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   357
        "add1/Add.html#AddAdd\"",
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   358
        "add2/add/add/add/Add.html#AddAdd\"",
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   359
        "add2/add/add/Add.html#AddAdd\"",
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   360
        "add2/add/Add.html#AddAdd\"",
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   361
        "add2/Add.html#AddAdd\"",
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   362
        "add3/add/add/add/Add.html#AddAdd\"",
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   363
        "add3/add/add/Add.html#AddAdd\"",
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   364
        "add3/add/Add.html#AddAdd\"",
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   365
        "add3/Add.html#AddAdd\"",
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   366
        "Add.html#ADDADD\"",
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   367
        "add0/add/add/add/Add.html#ADDADD\"",
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   368
        "add0/add/add/Add.html#ADDADD\"",
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   369
        "add0/add/Add.html#ADDADD\"",
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   370
        "add0/Add.html#ADDADD\"",
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   371
        "add1/add/add/add/Add.html#ADDADD\"",
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   372
        "add1/add/add/Add.html#ADDADD\"",
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   373
        "add1/add/Add.html#ADDADD\"",
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   374
        "add1/Add.html#ADDADD\"",
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   375
        "add2/add/add/add/Add.html#ADDADD\"",
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   376
        "add2/add/add/Add.html#ADDADD\"",
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   377
        "add2/add/Add.html#ADDADD\"",
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   378
        "add2/Add.html#ADDADD\"",
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   379
        "add3/add/add/add/Add.html#ADDADD\"",
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   380
        "add3/add/add/Add.html#ADDADD\"",
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   381
        "add3/add/Add.html#ADDADD\"",
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   382
        "add3/Add.html#ADDADD\""
b33effe4f252 8042829: [javadoc] index-file output is not sorted correctly
ksrini
parents: 24399
diff changeset
   383
    };
24220
eb213562268d 8039410: [javadoc] fix class-use items to be deterministic and index ordering
ksrini
parents:
diff changeset
   384
}