Implemented missing runtime tests
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2012-doxygen@13635 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
393ffd09da
commit
3ca3848464
5 changed files with 295 additions and 29 deletions
100
Examples/test-suite/java/doxygen_basic_notranslate_runme.java
Normal file
100
Examples/test-suite/java/doxygen_basic_notranslate_runme.java
Normal file
|
|
@ -0,0 +1,100 @@
|
|||
|
||||
import doxygen_basic_notranslate.*;
|
||||
import com.sun.javadoc.*;
|
||||
import java.util.HashMap;
|
||||
|
||||
public class doxygen_basic_notranslate_runme {
|
||||
static {
|
||||
try {
|
||||
System.loadLibrary("doxygen_basic_notranslate");
|
||||
} catch (UnsatisfiedLinkError e) {
|
||||
System.err.println("Native code library failed to load. See the chapter on Dynamic Linking Problems in the SWIG Java documentation for help.\n" + e);
|
||||
System.exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
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"});
|
||||
|
||||
HashMap<String, String> wantedComments = new HashMap<String, String>();
|
||||
wantedComments.put("doxygen_basic_notranslate.doxygen_basic_notranslate.function3(int)",
|
||||
" \n" +
|
||||
" A test for overloaded functions\n" +
|
||||
" This is function \\b one\n" +
|
||||
" \n" +
|
||||
"");
|
||||
wantedComments.put("doxygen_basic_notranslate.doxygen_basic_notranslate.function4()",
|
||||
" \n" +
|
||||
" A test of some mixed tag usage\n" +
|
||||
" \\if CONDITION\n" +
|
||||
" This \\a code fragment shows us something \\.\n" +
|
||||
" \\par Minuses:\n" +
|
||||
" \\arg it's senseless\n" +
|
||||
" \\arg it's stupid\n" +
|
||||
" \\arg it's null\n" +
|
||||
" \n" +
|
||||
" \\warning This may not work as expected\n" +
|
||||
" \n" +
|
||||
" \\code\n" +
|
||||
" int main() { while(true); }\n" +
|
||||
" \\endcode\n" +
|
||||
" \\endif\n" +
|
||||
" \n" +
|
||||
"");
|
||||
wantedComments.put("doxygen_basic_notranslate.doxygen_basic_notranslate.function()",
|
||||
" \n" +
|
||||
" \\brief\n" +
|
||||
" Brief description.\n" +
|
||||
" \n" +
|
||||
" The comment text\n" +
|
||||
" \\author Some author\n" +
|
||||
" \\return Some number\n" +
|
||||
" \\sa function2\n" +
|
||||
" \n" +
|
||||
"");
|
||||
wantedComments.put("doxygen_basic_notranslate.doxygen_basic_notranslate.function5(int)",
|
||||
" This is a post comment. \n" +
|
||||
"");
|
||||
wantedComments.put("doxygen_basic_notranslate.doxygen_basic_notranslate.function7(doxygen_basic_notranslate.SWIGTYPE_p_p_p_Shape)",
|
||||
" \n" +
|
||||
" Test for a parameter with difficult type\n" +
|
||||
" (mostly for python)\n" +
|
||||
" @param a Very strange param\n" +
|
||||
" \n" +
|
||||
"");
|
||||
wantedComments.put("doxygen_basic_notranslate.doxygen_basic_notranslate.function3(int, int)",
|
||||
" \n" +
|
||||
" A test for overloaded functions\n" +
|
||||
" This is function \\b two\n" +
|
||||
" \n" +
|
||||
"");
|
||||
wantedComments.put("doxygen_basic_notranslate.doxygen_basic_notranslate.function6(int)",
|
||||
" \n" +
|
||||
" Test for default args\n" +
|
||||
" @param a Some parameter, default is 42\n" +
|
||||
" \n" +
|
||||
"");
|
||||
wantedComments.put("doxygen_basic_notranslate.doxygen_basic_notranslate.function6()",
|
||||
" \n" +
|
||||
" Test for default args\n" +
|
||||
" @param a Some parameter, default is 42\n" +
|
||||
" \n" +
|
||||
"");
|
||||
wantedComments.put("doxygen_basic_notranslate.doxygen_basic_notranslate.function2()",
|
||||
" \n" +
|
||||
" A test of a very very very very very very very very very very very very very very very very\n" +
|
||||
" very very very very very long comment string.\n" +
|
||||
" \n" +
|
||||
"");
|
||||
|
||||
// and ask the parser to check comments for us
|
||||
System.exit(parser.check(wantedComments));
|
||||
}
|
||||
}
|
||||
105
Examples/test-suite/java/doxygen_tricky_constructs_runme.java
Normal file
105
Examples/test-suite/java/doxygen_tricky_constructs_runme.java
Normal file
|
|
@ -0,0 +1,105 @@
|
|||
|
||||
import doxygen_tricky_constructs.*;
|
||||
import com.sun.javadoc.*;
|
||||
import java.util.HashMap;
|
||||
|
||||
public class doxygen_tricky_constructs_runme {
|
||||
static {
|
||||
try {
|
||||
System.loadLibrary("doxygen_tricky_constructs");
|
||||
} catch (UnsatisfiedLinkError e) {
|
||||
System.err.println("Native code library failed to load. See the chapter on Dynamic Linking Problems in the SWIG Java documentation for help.\n" + e);
|
||||
System.exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
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_tricky_constructs runtime test",
|
||||
"commentParser", new String[]{"-quiet", "doxygen_tricky_constructs"});
|
||||
|
||||
HashMap<String, String> wantedComments = new HashMap<String, String>();
|
||||
|
||||
wantedComments.put("doxygen_tricky_constructs.doxygen_tricky_constructs.getConnection()",
|
||||
" \n" +
|
||||
" \n" +
|
||||
" This class manages connection. \n" +
|
||||
" \n" +
|
||||
"");
|
||||
wantedComments.put("doxygen_tricky_constructs.doxygen_tricky_constructs.getAddress(doxygen_tricky_constructs.SWIGTYPE_p_int, int)",
|
||||
" Returns address of file line. \n" +
|
||||
" \n" +
|
||||
" @param fileName name of the file, where the source line is located \n" +
|
||||
" @param line line number \n" +
|
||||
" {@link Connection::getId() }<br> \n" +
|
||||
" \n" +
|
||||
"");
|
||||
wantedComments.put("doxygen_tricky_constructs.doxygen_tricky_constructs.getG_zipCode()",
|
||||
" Tag endlink must be recognized also when it is the last token \n" +
|
||||
" in the commment. \n" +
|
||||
" \n" +
|
||||
" {@link Connection::getId() }<br> \n" +
|
||||
" {@link debugIdeTraceProfilerCoverageSample.py Python example. }\n" +
|
||||
" \n" +
|
||||
"");
|
||||
wantedComments.put("doxygen_tricky_constructs.doxygen_tricky_constructs.setG_zipCode(int)",
|
||||
" Tag endlink must be recognized also when it is the last token \n" +
|
||||
" in the commment. \n" +
|
||||
" \n" +
|
||||
" {@link Connection::getId() }<br> \n" +
|
||||
" {@link debugIdeTraceProfilerCoverageSample.py Python example. }\n" +
|
||||
" \n" +
|
||||
"");
|
||||
wantedComments.put("doxygen_tricky_constructs.doxygen_tricky_constructs.getG_counter()",
|
||||
" Tag endlink must be recognized also when followed by nonspace charater. \n" +
|
||||
" \n" +
|
||||
" {@link Connection::getId() }<br> \n" +
|
||||
" \n" +
|
||||
"");
|
||||
wantedComments.put("doxygen_tricky_constructs.doxygen_tricky_constructs.waitTime(int)",
|
||||
" Determines how long the <code>isystem.connect</code> should wait for running \n" +
|
||||
" instances to respond. Only one of <code>lfWaitXXX</code> flags from IConnect::ELaunchFlags \n" +
|
||||
" may be specified. \n" +
|
||||
" \n" +
|
||||
"");
|
||||
wantedComments.put("doxygen_tricky_constructs.CConnectionConfig",
|
||||
" This class contains information for connection to winIDEA. Its methods \n" +
|
||||
" return reference to self, so we can use it like this: \n" +
|
||||
" <pre> \n" +
|
||||
" CConnectionConfig config = new CConnectionConfig(); \n" +
|
||||
" config.discoveryPort(5534).dllPath(\"C: \\ yWinIDEA \\ onnect.dll\").id(\"main\"); \n" +
|
||||
" </pre> \n" +
|
||||
" \n" +
|
||||
" All parameters are optional. Set only what is required, default values are \n" +
|
||||
" used for unspecified parameters. \n" +
|
||||
" <p> \n" +
|
||||
" \n" +
|
||||
" {@link advancedWinIDEALaunching.py Python example. }<br> \n" +
|
||||
" \n" +
|
||||
"");
|
||||
wantedComments.put("doxygen_tricky_constructs.doxygen_tricky_constructs.getAddress(doxygen_tricky_constructs.SWIGTYPE_p_int, int, boolean)",
|
||||
" Returns address of file line. \n" +
|
||||
" \n" +
|
||||
" @param fileName name of the file, where the source line is located \n" +
|
||||
" @param line line number \n" +
|
||||
" @param isGetSize if set, for every object location both address and size are returned \n" +
|
||||
" \n" +
|
||||
" {@link Connection::getId() }<br> \n" +
|
||||
" \n" +
|
||||
"");
|
||||
wantedComments.put("doxygen_tricky_constructs.doxygen_tricky_constructs.setG_counter(char)",
|
||||
" Tag endlink must be recognized also when followed by nonspace charater. \n" +
|
||||
" \n" +
|
||||
" {@link Connection::getId() }<br> \n" +
|
||||
" \n" +
|
||||
"");
|
||||
|
||||
// and ask the parser to check comments for us
|
||||
System.exit(parser.check(wantedComments));
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue