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
Backport-of: e83046409d81d074cd68dc823e794a852ed93cee
  • Loading branch information
shipilev committed Feb 29, 2024
1 parent 0ae93db commit b183cd2
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2002, 2016, 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 @@ -42,7 +42,8 @@ public static void main(String... args) throws Exception {

@Test
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, 2016, 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 @@ -45,7 +45,8 @@ public static void main(String... args) throws Exception {

@Test
void test() {
javadoc("-Xdoclint:none",
javadoc("-encoding", "UTF-8",
"-Xdoclint:none",
"-d", "out",
testSrc("TestTagMisuse.java"));
checkExit(Exit.OK);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2002, 2016, 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
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, 2018, 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 @@ -42,7 +42,8 @@ public static void main(String... args) throws Exception {

@Test
void test() {
javadoc("-d", "out",
javadoc("-encoding", "UTF-8",
"-d", "out",
"-sourcepath", testSrc,
testSrc("C.java"));
checkExit(Exit.OK);
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 b183cd2

@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.