renamed test case

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2012-doxygen@13726 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Marko Klopcic 2012-08-27 20:25:00 +00:00
commit af74b4f96a
5 changed files with 32 additions and 42 deletions

View file

@ -1,12 +1,12 @@
import doxygen_tricky_constructs.*; import doxygen_misc_constructs.*;
import com.sun.javadoc.*; import com.sun.javadoc.*;
import java.util.HashMap; import java.util.HashMap;
public class doxygen_tricky_constructs_runme { public class doxygen_misc_constructs_runme {
static { static {
try { try {
System.loadLibrary("doxygen_tricky_constructs"); System.loadLibrary("doxygen_misc_constructs");
} catch (UnsatisfiedLinkError e) { } 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.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); System.exit(1);
@ -20,18 +20,18 @@ public class doxygen_tricky_constructs_runme {
and calls the start() method of that class with parsed information. and calls the start() method of that class with parsed information.
*/ */
commentParser parser = new commentParser(); commentParser parser = new commentParser();
com.sun.tools.javadoc.Main.execute("doxygen_tricky_constructs runtime test", com.sun.tools.javadoc.Main.execute("doxygen_misc_constructs runtime test",
"commentParser", new String[]{"-quiet", "doxygen_tricky_constructs"}); "commentParser", new String[]{"-quiet", "doxygen_misc_constructs"});
HashMap<String, String> wantedComments = new HashMap<String, String>(); HashMap<String, String> wantedComments = new HashMap<String, String>();
wantedComments.put("doxygen_tricky_constructs.doxygen_tricky_constructs.getConnection()", wantedComments.put("doxygen_misc_constructs.doxygen_misc_constructs.getConnection()",
" \n" + " \n" +
" \n" + " \n" +
" This class manages connection. \n" + " This class manages connection. \n" +
" \n" + " \n" +
""); "");
wantedComments.put("doxygen_tricky_constructs.doxygen_tricky_constructs.getAddress(doxygen_tricky_constructs.SWIGTYPE_p_int, int)", wantedComments.put("doxygen_misc_constructs.doxygen_misc_constructs.getAddress(doxygen_misc_constructs.SWIGTYPE_p_int, int)",
" Returns address of file line. \n" + " Returns address of file line. \n" +
" \n" + " \n" +
" @param fileName name of the file, where the source line is located \n" + " @param fileName name of the file, where the source line is located \n" +
@ -39,7 +39,7 @@ public class doxygen_tricky_constructs_runme {
" {@link Connection::getId() }<br> \n" + " {@link Connection::getId() }<br> \n" +
" \n" + " \n" +
""); "");
wantedComments.put("doxygen_tricky_constructs.doxygen_tricky_constructs.getG_zipCode()", wantedComments.put("doxygen_misc_constructs.doxygen_misc_constructs.getG_zipCode()",
" Tag endlink must be recognized also when it is the last token \n" + " Tag endlink must be recognized also when it is the last token \n" +
" in the commment. \n" + " in the commment. \n" +
" \n" + " \n" +
@ -47,7 +47,7 @@ public class doxygen_tricky_constructs_runme {
" {@link debugIdeTraceProfilerCoverageSample.py Python example. }\n" + " {@link debugIdeTraceProfilerCoverageSample.py Python example. }\n" +
" \n" + " \n" +
""); "");
wantedComments.put("doxygen_tricky_constructs.doxygen_tricky_constructs.setG_zipCode(int)", wantedComments.put("doxygen_misc_constructs.doxygen_misc_constructs.setG_zipCode(int)",
" Tag endlink must be recognized also when it is the last token \n" + " Tag endlink must be recognized also when it is the last token \n" +
" in the commment. \n" + " in the commment. \n" +
" \n" + " \n" +
@ -55,19 +55,19 @@ public class doxygen_tricky_constructs_runme {
" {@link debugIdeTraceProfilerCoverageSample.py Python example. }\n" + " {@link debugIdeTraceProfilerCoverageSample.py Python example. }\n" +
" \n" + " \n" +
""); "");
wantedComments.put("doxygen_tricky_constructs.doxygen_tricky_constructs.getG_counter()", wantedComments.put("doxygen_misc_constructs.doxygen_misc_constructs.getG_counter()",
" Tag endlink must be recognized also when followed by nonspace charater. \n" + " Tag endlink must be recognized also when followed by nonspace charater. \n" +
" \n" + " \n" +
" {@link Connection::getId() }<br> \n" + " {@link Connection::getId() }<br> \n" +
" \n" + " \n" +
""); "");
wantedComments.put("doxygen_tricky_constructs.doxygen_tricky_constructs.waitTime(int)", wantedComments.put("doxygen_misc_constructs.doxygen_misc_constructs.waitTime(int)",
" Determines how long the <code>isystem.connect</code> should wait for running \n" + " 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" + " instances to respond. Only one of <code>lfWaitXXX</code> flags from IConnect::ELaunchFlags \n" +
" may be specified. \n" + " may be specified. \n" +
" \n" + " \n" +
""); "");
wantedComments.put("doxygen_tricky_constructs.CConnectionConfig", wantedComments.put("doxygen_misc_constructs.CConnectionConfig",
" This class contains information for connection to winIDEA. Its methods \n" + " This class contains information for connection to winIDEA. Its methods \n" +
" return reference to self, so we can use it like this: \n" + " return reference to self, so we can use it like this: \n" +
" <pre> \n" + " <pre> \n" +
@ -82,7 +82,7 @@ public class doxygen_tricky_constructs_runme {
" {@link advancedWinIDEALaunching.py Python example. }<br> \n" + " {@link advancedWinIDEALaunching.py Python example. }<br> \n" +
" \n" + " \n" +
""); "");
wantedComments.put("doxygen_tricky_constructs.doxygen_tricky_constructs.getAddress(doxygen_tricky_constructs.SWIGTYPE_p_int, int, boolean)", wantedComments.put("doxygen_misc_constructs.doxygen_misc_constructs.getAddress(doxygen_misc_constructs.SWIGTYPE_p_int, int, boolean)",
" Returns address of file line. \n" + " Returns address of file line. \n" +
" \n" + " \n" +
" @param fileName name of the file, where the source line is located \n" + " @param fileName name of the file, where the source line is located \n" +
@ -92,7 +92,7 @@ public class doxygen_tricky_constructs_runme {
" {@link Connection::getId() }<br> \n" + " {@link Connection::getId() }<br> \n" +
" \n" + " \n" +
""); "");
wantedComments.put("doxygen_tricky_constructs.doxygen_tricky_constructs.setG_counter(char)", wantedComments.put("doxygen_misc_constructs.doxygen_misc_constructs.setG_counter(char)",
" Tag endlink must be recognized also when followed by nonspace charater. \n" + " Tag endlink must be recognized also when followed by nonspace charater. \n" +
" \n" + " \n" +
" {@link Connection::getId() }<br> \n" + " {@link Connection::getId() }<br> \n" +

View file

@ -103,23 +103,24 @@ bool DoxygenParser::isSectionIndicator(const std::string &smallString) {
void DoxygenParser::printTree(const DoxygenEntityList &rootList) { void DoxygenParser::printTree(const DoxygenEntityList &rootList) {
DoxygenEntityList::const_iterator p = rootList.begin(); DoxygenEntityList::const_iterator p = rootList.begin();
while (p != rootList.end()) { while (p != rootList.end()) {
(*p).printEntity(0); (*p).printEntity(0);
p++; p++;
} }
} }
int DoxygenParser::commandBelongs(const std::string &theCommand) { int DoxygenParser::commandBelongs(const std::string &theCommand) {
std::string smallString = stringToLower(theCommand);
//cout << " Looking for command " << theCommand << endl; std::string smallString = stringToLower(theCommand);
std::map<std::string, DoxyCommandEnum>::iterator it = //cout << " Looking for command " << theCommand << endl;
doxygenCommands.find(smallString); DoxyCommandsMapIt it = doxygenCommands.find(smallString);
if (it != doxygenCommands.end()) {
return it->second; if (it != doxygenCommands.end()) {
} return it->second;
return 0; }
return 0;
} }
@ -922,22 +923,11 @@ DoxygenParser::TokenList DoxygenParser::tokenizeDoxygenComment(const std::string
void DoxygenParser::printList() { void DoxygenParser::printList() {
TokenListIt p = m_tokenList.begin();
int i = 1;
int b = 0;
while (p != m_tokenList.end()) {
cout << (*p).toString() << " ";
b = i % TOKENSPERLINE;
if (b == 0)
cout << endl;
p++;
i++;
}
TokenListCIt startIt = m_tokenList.begin();
int tokNo = 0; int tokNo = 0;
for (TokenListCIt it = startIt; it != m_tokenList.end(); it++, tokNo++) { for (TokenListCIt it = m_tokenList.begin(); it != m_tokenList.end();
it++, tokNo++) {
cout << it->toString() << " "; cout << it->toString() << " ";
if ((tokNo % TOKENSPERLINE) == 0) { if ((tokNo % TOKENSPERLINE) == 0) {
@ -946,6 +936,7 @@ void DoxygenParser::printList() {
} }
} }
void DoxygenParser::printListError(int warningType, void DoxygenParser::printListError(int warningType,
const std::string &message) { const std::string &message) {
int curLine = m_fileLineNo; int curLine = m_fileLineNo;

View file

@ -39,7 +39,6 @@ private:
} DoxyCommandEnum; } DoxyCommandEnum;
/** This class contains parts of Doxygen comment as a token. */ /** This class contains parts of Doxygen comment as a token. */
class Token { class Token {
public: public: