Skip to content

Commit

Permalink
8314552: Fix javadoc tests to work with jtreg 7
Browse files Browse the repository at this point in the history
Reviewed-by: phh, shade, andrew
  • Loading branch information
lutkerd authored and Paul Hohensee committed Aug 23, 2023
1 parent 49ffbcf commit e830464
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 12 deletions.
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -43,7 +43,8 @@ public static void main(String... args) throws Exception {

@Test
public void test() {
javadoc("-d", "out",
javadoc("-encoding", "UTF-8",
"-d", "out",
testSrc("C.java"));
checkExit(Exit.OK);

Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -46,7 +46,8 @@ public static void main(String... args) throws Exception {

@Test
public void test() {
javadoc("-Xdoclint:none",
javadoc("-encoding", "UTF-8",
"-Xdoclint:none",
"-d", "out",
testSrc("TestTagMisuse.java"));
checkExit(Exit.OK);
Expand Down
4 changes: 2 additions & 2 deletions test/langtools/jdk/javadoc/doclet/testThrows/TestThrows.java
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -67,7 +67,7 @@ public interface C {
}
""");

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);
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -44,7 +44,8 @@ public static void main(String... args) throws Exception {

@Test
public void test() {
javadoc("-d", "out",
javadoc("-encoding", "UTF-8",
"-d", "out",
testSrc("C.java"));
checkExit(Exit.OK);

Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -43,7 +43,8 @@ public static void main(String... args) throws Exception {

@Test
public void test() {
javadoc("-d", "out",
javadoc("-encoding", "UTF-8",
"-d", "out",
"-sourcepath", testSrc("src1"),
testSrc("src1/C.java"));
checkExit(Exit.OK);
Expand Down Expand Up @@ -130,7 +131,8 @@ public void test() {

@Test
public void testUse() {
javadoc("-d", "out-use",
javadoc("-encoding", "UTF-8",
"-d", "out-use",
"-use",
testSrc("src2/A.java"),
testSrc("src2/B.java"));
Expand Down
3 changes: 2 additions & 1 deletion test/langtools/jdk/javadoc/tool/nonConstExprs/Test.java
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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()
};
Expand Down

1 comment on commit e830464

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.