diff --git a/test/jdk/TEST.groups b/test/jdk/TEST.groups index e7ee8990f94..4ac340ad3a3 100644 --- a/test/jdk/TEST.groups +++ b/test/jdk/TEST.groups @@ -670,4 +670,4 @@ jdk_core_no_security = \ # Set of tests for `@since` checks in source code documentation jdk_since_checks = \ - tools/sincechecker/modules/java_base/CheckSince_javaBase.java + tools/sincechecker/ diff --git a/test/jdk/tools/sincechecker/TEST.properties b/test/jdk/tools/sincechecker/TEST.properties new file mode 100644 index 00000000000..27f669ef4ca --- /dev/null +++ b/test/jdk/tools/sincechecker/TEST.properties @@ -0,0 +1,4 @@ +modules = \ + jdk.compiler/com.sun.tools.javac.api \ + jdk.compiler/com.sun.tools.javac.util \ + jdk.compiler/com.sun.tools.javac.code diff --git a/test/jdk/tools/sincechecker/modules/java_base/CheckSince_javaBase.java b/test/jdk/tools/sincechecker/modules/java.base/JavaBaseCheckSince.java similarity index 81% rename from test/jdk/tools/sincechecker/modules/java_base/CheckSince_javaBase.java rename to test/jdk/tools/sincechecker/modules/java.base/JavaBaseCheckSince.java index 6d0b9d0e932..64d5bf2465f 100644 --- a/test/jdk/tools/sincechecker/modules/java_base/CheckSince_javaBase.java +++ b/test/jdk/tools/sincechecker/modules/java.base/JavaBaseCheckSince.java @@ -24,11 +24,7 @@ /* * @test * @bug 8331051 - * @summary Test for `@since` for java.base module - * @library /test/lib - * /test/jdk/tools/sincechecker - * @modules jdk.compiler/com.sun.tools.javac.api - * jdk.compiler/com.sun.tools.javac.util - * jdk.compiler/com.sun.tools.javac.code + * @summary Test for `@since` in java.base module + * @library /test/lib /test/jdk/tools/sincechecker * @run main SinceChecker java.base --exclude java.lang.classfile */ diff --git a/test/jdk/tools/sincechecker/modules/java.compiler/JavaCompilerCheckSince.java b/test/jdk/tools/sincechecker/modules/java.compiler/JavaCompilerCheckSince.java new file mode 100644 index 00000000000..c843c962d27 --- /dev/null +++ b/test/jdk/tools/sincechecker/modules/java.compiler/JavaCompilerCheckSince.java @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2024, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 8341399 + * @summary Test for `@since` in java.compiler module + * @library /test/lib /test/jdk/tools/sincechecker + * @run main SinceChecker java.compiler + */ diff --git a/test/jdk/tools/sincechecker/modules/jdk.compiler/JdkCompilerCheckSince.java b/test/jdk/tools/sincechecker/modules/jdk.compiler/JdkCompilerCheckSince.java new file mode 100644 index 00000000000..5eb819786e9 --- /dev/null +++ b/test/jdk/tools/sincechecker/modules/jdk.compiler/JdkCompilerCheckSince.java @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2024, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 8341399 + * @summary Test for `@since` in jdk.compiler module + * @library /test/lib /test/jdk/tools/sincechecker + * @run main SinceChecker jdk.compiler + */ diff --git a/test/jdk/tools/sincechecker/modules/jdk.javadoc/JdkJavadocCheckSince.java b/test/jdk/tools/sincechecker/modules/jdk.javadoc/JdkJavadocCheckSince.java new file mode 100644 index 00000000000..0e68d8213e9 --- /dev/null +++ b/test/jdk/tools/sincechecker/modules/jdk.javadoc/JdkJavadocCheckSince.java @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2024, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 8341399 + * @summary Test for `@since` in jdk.javadoc module + * @library /test/lib /test/jdk/tools/sincechecker + * @run main SinceChecker jdk.javadoc + */ diff --git a/test/jdk/tools/sincechecker/modules/jdk.jdeps/JdkJdepsCheckSince.java b/test/jdk/tools/sincechecker/modules/jdk.jdeps/JdkJdepsCheckSince.java new file mode 100644 index 00000000000..68439c49e24 --- /dev/null +++ b/test/jdk/tools/sincechecker/modules/jdk.jdeps/JdkJdepsCheckSince.java @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2024, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 8341399 + * @summary Test for `@since` in jdk.jdeps module + * @library /test/lib /test/jdk/tools/sincechecker + * @run main SinceChecker jdk.jdeps + */ diff --git a/test/jdk/tools/sincechecker/modules/jdk.jshell/JdkJshellCheckSince.java b/test/jdk/tools/sincechecker/modules/jdk.jshell/JdkJshellCheckSince.java new file mode 100644 index 00000000000..09f762cfeba --- /dev/null +++ b/test/jdk/tools/sincechecker/modules/jdk.jshell/JdkJshellCheckSince.java @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2024, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 8341399 + * @summary Test for `@since` in jdk.jshell module + * @library /test/lib /test/jdk/tools/sincechecker + * @run main SinceChecker jdk.jshell + */