8314552: Fix javadoc tests to work with jtreg 7

Reviewed-by: phh, shade, andrew
This commit is contained in:
Dan Lutker
2023-08-23 18:42:34 +00:00
committed by Paul Hohensee
parent 49ffbcf4bc
commit e83046409d
6 changed files with 18 additions and 12 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2002, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -43,7 +43,8 @@ public class TestSerialVersionUID extends JavadocTester {
@Test
public void test() {
javadoc("-d", "out",
javadoc("-encoding", "UTF-8",
"-d", "out",
testSrc("C.java"));
checkExit(Exit.OK);

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -46,7 +46,8 @@ public class TestTagMisuse extends JavadocTester {
@Test
public void test() {
javadoc("-Xdoclint:none",
javadoc("-encoding", "UTF-8",
"-Xdoclint:none",
"-d", "out",
testSrc("TestTagMisuse.java"));
checkExit(Exit.OK);

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2002, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -67,7 +67,7 @@
}
""");
javadoc("-d", base.resolve("out").toString(),
javadoc("-encoding", "UTF-8", "-d", base.resolve("out").toString(),
"--no-platform-links",
src.resolve("C.java").toString());
checkExit(Exit.OK);

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2002, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -44,7 +44,8 @@ public class TestThrowsHead extends JavadocTester {
@Test
public void test() {
javadoc("-d", "out",
javadoc("-encoding", "UTF-8",
"-d", "out",
testSrc("C.java"));
checkExit(Exit.OK);

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -43,7 +43,8 @@ public class TestUnnamedPackage extends JavadocTester {
@Test
public void test() {
javadoc("-d", "out",
javadoc("-encoding", "UTF-8",
"-d", "out",
"-sourcepath", testSrc("src1"),
testSrc("src1/C.java"));
checkExit(Exit.OK);
@@ -130,7 +131,8 @@ public class TestUnnamedPackage extends JavadocTester {
@Test
public void testUse() {
javadoc("-d", "out-use",
javadoc("-encoding", "UTF-8",
"-d", "out-use",
"-use",
testSrc("src2/A.java"),
testSrc("src2/B.java"));

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2013, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -34,6 +34,7 @@ public class Test {
public static void main(String... args) throws Exception {
File testSrc = new File(System.getProperty("test.src"));
String[] jdoc_args = {
"-encoding", "UTF-8",
"-d", "out",
new File(testSrc, Test.class.getSimpleName() + ".java").getPath()
};