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_alias.*;
|
||||
import com.sun.javadoc.*;
|
||||
import java.util.HashMap;
|
||||
|
||||
public class doxygen_alias_runme {
|
||||
|
|
@ -15,10 +14,7 @@ public class doxygen_alias_runme {
|
|||
|
||||
public static void main(String argv[])
|
||||
{
|
||||
CommentParser parser = new CommentParser();
|
||||
com.sun.tools.javadoc.Main.execute("doxygen_alias runtime test",
|
||||
"CommentParser",
|
||||
new String[]{"-quiet", "doxygen_alias"});
|
||||
CommentParser.parse("doxygen_alias");
|
||||
|
||||
HashMap<String, String> wantedComments = new HashMap<String, String>();
|
||||
wantedComments.put("doxygen_alias.doxygen_alias.make_something()",
|
||||
|
|
@ -27,6 +23,6 @@ public class doxygen_alias_runme {
|
|||
" @return A new object which may be null.\n" +
|
||||
"");
|
||||
|
||||
System.exit(parser.check(wantedComments));
|
||||
System.exit(CommentParser.check(wantedComments));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue