Skip to content

Commit

Permalink
JBR-4173 Tier1 test failures in jdk/javadoc/doclet/testModules
Browse files Browse the repository at this point in the history
Introduction of JBR API changed the order of modules appearing in Java
Doc. This commit updates the corresponding tests to match the current
output with JBR API.
  • Loading branch information
mkartashev authored and jbrbot committed Jan 24, 2024
1 parent 618372b commit 8b05768
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,8 @@ public void checkExportsToOpensToDetailMode(Path base) throws Exception {
checkOutput("a/module-summary.html", true,
"Indirect Opens",
"""
<div class="col-first even-row-color"><a href="../m/module-summary.html">m</a></div>
<div class="col-last even-row-color">opensto</div>
<div class="col-first odd-row-color"><a href="../m/module-summary.html">m</a></div>
<div class="col-last odd-row-color">opensto</div>
</div>
""");
}
Expand Down
19 changes: 16 additions & 3 deletions test/langtools/jdk/javadoc/doclet/testModules/TestModules.java
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ public void testApiMode() {
"--module", "moduleA,moduleB,moduleC,moduletags",
"testpkgmdlA", "moduleA/concealedpkgmdlA", "testpkgmdlB", "testpkg2mdlB", "testpkgmdlC", "testpkgmdltags");
checkExit(Exit.OK);
checkModuleModeCommon();
checkModuleModeCommon(true);
checkModuleModeApi(true);
checkModuleModeAll(false);
}
Expand All @@ -234,7 +234,7 @@ public void testAllMode() {
"--module", "moduleA,moduleB,moduleC,moduletags",
"testpkgmdlA", "moduleA/concealedpkgmdlA", "testpkgmdlB", "testpkg2mdlB", "testpkgmdlC", "testpkgmdltags");
checkExit(Exit.OK);
checkModuleModeCommon();
checkModuleModeCommon(false);
checkModuleModeApi(false);
checkModuleModeAll(true);
}
Expand Down Expand Up @@ -872,7 +872,7 @@ void checkModulesInSearch(boolean found) {
<dd>with description</dd>""");
}

void checkModuleModeCommon() {
void checkModuleModeCommon(boolean isApi) {
checkOutput("index.html", true,
"""
<div class="col-first even-row-color all-modules-table all-modules-table-tab1"><\
Expand All @@ -897,14 +897,21 @@ void checkModuleModeCommon() {
</div>""");
checkOutput("moduleA/module-summary.html", true,
"""
<ol class="toc-list">
<li><a href="#" tabindex="0">Description</a></li>
<li><a href="#packages-summary" tabindex="0">Packages</a></li>
<li><a href="#modules-summary" tabindex="0">Modules</a></li>
</ol>""",
isApi ?
"""
<div class="col-first even-row-color"><a href="../moduleB/module-summary.html">moduleB</a></div>
<div class="col-last even-row-color"><a href="../moduleB/testpkgmdlB/package-summary.html">testpkgmdlB</a></div>
"""
:
"""
<div class="col-first odd-row-color"><a href="../moduleB/module-summary.html">moduleB</a></div>
<div class="col-last odd-row-color"><a href="../moduleB/testpkgmdlB/package-summary.html">testpkgmdlB</a></div>
""");
checkOutput("moduletags/module-summary.html", true,
"""
Expand Down Expand Up @@ -946,9 +953,15 @@ void checkModuleModeCommon() {
<div class="details-table two-column-summary">
<div class="table-header col-first">From</div>
<div class="table-header col-last">Packages</div>""",
isApi ?
"""
<div class="col-first even-row-color"><a href="../moduleB/module-summary.html">moduleB</a></div>
<div class="col-last even-row-color"><a href="../moduleB/testpkgmdlB/package-summary.html">testpkgmdlB</a></div>
"""
:
"""
<div class="col-first odd-row-color"><a href="../moduleB/module-summary.html">moduleB</a></div>
<div class="col-last odd-row-color"><a href="../moduleB/testpkgmdlB/package-summary.html">testpkgmdlB</a></div>
""");
}

Expand Down

0 comments on commit 8b05768

Please sign in to comment.