8047157: [javadoc] fixup tests for determinism and add classes uses
Reviewed-by: jjg
This commit is contained in:
parent
b963c0bc59
commit
7aa3c59051
@ -36,20 +36,19 @@
|
||||
import java.util.Locale;
|
||||
|
||||
public class TestHtmlTag extends JavadocTester {
|
||||
|
||||
private static final String defaultLanguage = Locale.getDefault().getLanguage();
|
||||
public static void main(String... args) throws Exception {
|
||||
TestHtmlTag tester = new TestHtmlTag();
|
||||
tester.runTests();
|
||||
}
|
||||
|
||||
@Test
|
||||
void test_default() {
|
||||
javadoc("-d", "out-default",
|
||||
javadoc("-locale", defaultLanguage,
|
||||
"-d", "out-default",
|
||||
"-sourcepath", testSrc,
|
||||
"pkg1");
|
||||
checkExit(Exit.OK);
|
||||
|
||||
String defaultLanguage = Locale.getDefault().getLanguage();
|
||||
checkExit(Exit.OK);
|
||||
|
||||
checkOutput("pkg1/C1.html", true,
|
||||
"<html lang=\"" + defaultLanguage + "\">");
|
||||
|
@ -79,6 +79,23 @@ public class TestUseOption extends JavadocTester {
|
||||
"<a href=\"../../index.html?pkg2/class-use/C3.html\" target=\"_top\">"
|
||||
+ "Frames</a></li>"
|
||||
);
|
||||
checkOutput("pkg1/class-use/UsedClass.html", true,
|
||||
"that return types with arguments of type"
|
||||
);
|
||||
checkOutput("pkg1/class-use/UsedClass.html", true,
|
||||
"<a href=\"../../pkg1/C1.html#methodInC1ReturningType--\">methodInC1ReturningType</a>"
|
||||
);
|
||||
checkOutput("pkg1/class-use/UsedInterface.html", true,
|
||||
"Classes in <a href=\"../../pkg1/package-summary.html\">pkg1</a> that implement " +
|
||||
"<a href=\"../../pkg1/UsedInterface.html\" title=\"interface in pkg1\">UsedInterface</a>"
|
||||
);
|
||||
checkOutput("pkg1/class-use/UsedInterfaceA.html", true,
|
||||
"Classes in <a href=\"../../pkg1/package-summary.html\">pkg1</a> that implement " +
|
||||
"<a href=\"../../pkg1/UsedInterfaceA.html\" title=\"interface in pkg1\">UsedInterfaceA</a>"
|
||||
);
|
||||
checkOutput("pkg1/class-use/UsedClass.html", false,
|
||||
"methodInC1Protected"
|
||||
);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2002, 2004, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2002, 2014, 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
|
||||
@ -23,6 +23,8 @@
|
||||
|
||||
package pkg1;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Test 3 passes.
|
||||
*/
|
||||
@ -40,4 +42,15 @@ public class C1 {
|
||||
public UsedClass methodInC1(UsedClass p) {
|
||||
return p;
|
||||
}
|
||||
|
||||
public List<UsedClass> methodInC1ReturningType() {
|
||||
return null;
|
||||
}
|
||||
|
||||
/*
|
||||
* this must not appear anywhere.
|
||||
*/
|
||||
UsedClass methodInC1Protected(List<UsedClass> p){
|
||||
return p;
|
||||
}
|
||||
}
|
||||
|
41
langtools/test/com/sun/javadoc/testUseOption/pkg1/C10.java
Normal file
41
langtools/test/com/sun/javadoc/testUseOption/pkg1/C10.java
Normal file
@ -0,0 +1,41 @@
|
||||
/*
|
||||
* Copyright (c) 2014, 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.
|
||||
*/
|
||||
|
||||
package pkg1;
|
||||
|
||||
/**
|
||||
* An implementor
|
||||
*
|
||||
*/
|
||||
public class C10 extends UsedClass implements UsedInterface, UsedInterfaceA {
|
||||
|
||||
/**
|
||||
* Nothing
|
||||
*/
|
||||
public void doNothing() {}
|
||||
|
||||
/**
|
||||
* Me too
|
||||
*/
|
||||
public void doNothingA() {}
|
||||
}
|
32
langtools/test/com/sun/javadoc/testUseOption/pkg1/C9.java
Normal file
32
langtools/test/com/sun/javadoc/testUseOption/pkg1/C9.java
Normal file
@ -0,0 +1,32 @@
|
||||
/*
|
||||
* Copyright (c) 2014, 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.
|
||||
*/
|
||||
|
||||
package pkg1;
|
||||
|
||||
/**
|
||||
* An implementor
|
||||
*
|
||||
*/
|
||||
public class C9 implements UsedInterface, UsedInterfaceA {
|
||||
public void doNothing(){}
|
||||
}
|
@ -0,0 +1,37 @@
|
||||
/*
|
||||
* Copyright (c) 2014, 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* An interface
|
||||
*
|
||||
*/
|
||||
|
||||
package pkg1;
|
||||
|
||||
public interface UsedInterface {
|
||||
|
||||
/**
|
||||
* Does nothing
|
||||
*/
|
||||
void doNothing();
|
||||
}
|
@ -0,0 +1,37 @@
|
||||
/*
|
||||
* Copyright (c) 2014, 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* An interface
|
||||
*
|
||||
*/
|
||||
|
||||
package pkg1;
|
||||
|
||||
public interface UsedInterfaceA {
|
||||
|
||||
/**
|
||||
* Does nothing
|
||||
*/
|
||||
void doNothingA();
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user