Rewrite Doxygen unit tests for Java using Java 9 API
In particular, do not use com.sun.javadoc deprecated since Java 9 and finally removed in Java 13, to allow the tests to run under modern JRE. They don't run under Java 8 and earlier any more, but this shouldn't be a huge problem nowadays and as SWIG output is independent from the Java version used, it's enough to test it with modern Java versions. Note that the tests themselves were changed only in the most minimal way, to adapt them to the new way of running javadoc (which is now also integrated into CommentParser itself instead of being duplicated in every test).
This commit is contained in:
parent
5a8875ca9d
commit
66a7826192
18 changed files with 140 additions and 180 deletions
|
|
@ -1,6 +1,5 @@
|
|||
|
||||
import doxygen_basic_notranslate.*;
|
||||
import com.sun.javadoc.*;
|
||||
import java.util.HashMap;
|
||||
|
||||
public class doxygen_basic_notranslate_runme {
|
||||
|
|
@ -15,14 +14,7 @@ public class doxygen_basic_notranslate_runme {
|
|||
|
||||
public static void main(String argv[])
|
||||
{
|
||||
/*
|
||||
Here we are using internal javadoc tool, it accepts the name of the class as paramterer,
|
||||
and calls the start() method of that class with parsed information.
|
||||
*/
|
||||
CommentParser parser = new CommentParser();
|
||||
com.sun.tools.javadoc.Main.execute("doxygen_basic_notranslate runtime test",
|
||||
"CommentParser",
|
||||
new String[]{"-quiet", "doxygen_basic_notranslate"});
|
||||
CommentParser.parse("doxygen_basic_notranslate");
|
||||
|
||||
HashMap<String, String> wantedComments = new HashMap<String, String>();
|
||||
wantedComments.put("doxygen_basic_notranslate.doxygen_basic_notranslate.function3(int)",
|
||||
|
|
@ -97,6 +89,6 @@ public class doxygen_basic_notranslate_runme {
|
|||
"");
|
||||
|
||||
// and ask the parser to check comments for us
|
||||
System.exit(parser.check(wantedComments));
|
||||
System.exit(CommentParser.check(wantedComments));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue