summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarko Klopcic <markok3.14@gmail.com>2013-01-29 08:13:03 +0100
committerMarko Klopcic <markok3.14@gmail.com>2013-01-29 08:13:03 +0100
commit289693887961909ca69b890246b0ad9c0259f602 (patch)
tree7baef703d48c0351e42d144a615134163aa64c9a
parenta2a345be39a688f77dfe1f020616400de395fa42 (diff)
downloadswig-289693887961909ca69b890246b0ad9c0259f602.tar.gz
only whitespace cnhanges and code comment update
-rw-r--r--Examples/test-suite/doxygen_misc_constructs.h2
-rw-r--r--Examples/test-suite/java/commentParser.java15
-rw-r--r--Examples/test-suite/java/doxygen_misc_constructs_runme.java147
-rw-r--r--Source/DoxygenTranslator/src/JavaDocConverter.cpp1
4 files changed, 86 insertions, 79 deletions
diff --git a/Examples/test-suite/doxygen_misc_constructs.h b/Examples/test-suite/doxygen_misc_constructs.h
index dd345ca3a..d25b5af15 100644
--- a/Examples/test-suite/doxygen_misc_constructs.h
+++ b/Examples/test-suite/doxygen_misc_constructs.h
@@ -43,7 +43,7 @@ void backslashA()
* Standalone @ and '@' get to output.
* Commands "in quoted \b strings are treated as plain text".
* Commands not recognized by Doxygen \blah @blah are ignored.
- * Backslashes in DOS paths d:\xyz\qwe\myfile and words
+ * Backslashes in DOS paths d:\xyz\qwe\myfile and words
* following them do not appear on output, we must quote them with
* double quotes: "d:\xyz\qwe\myfile", "@something". Single quotes do not help:
* 'd:\xyz\qwe\myfile'. Escaping works: d:\\xyz\\qwe\\myfile. Unix
diff --git a/Examples/test-suite/java/commentParser.java b/Examples/test-suite/java/commentParser.java
index cc40c4ac8..390bda8a8 100644
--- a/Examples/test-suite/java/commentParser.java
+++ b/Examples/test-suite/java/commentParser.java
@@ -54,13 +54,24 @@ public class commentParser {
String wantedStr = wantedComments.get(e.getKey());
// this may be weird, but I don't know any more effective solution
actualStr = actualStr.replace(" ", "");
+ actualStr = actualStr.replaceAll("\t", "");
actualStr = actualStr.replace("\n", "");
- actualStr = actualStr.replace("\t", "");
if (wantedStr != null) {
wantedStr = wantedStr.replace(" ", "");
- wantedStr = wantedStr.replace("\n", "");
wantedStr = wantedStr.replace("\t", "");
+ wantedStr = wantedStr.replace("\n", "");
}
+ /* The following lines replace multiple whitespaces with a single one.
+ Although this would be more exact testing, it would also require
+ more work on test maintenance.
+ actualStr = actualStr.replace('\t', ' ');
+ actualStr = actualStr.replaceAll(" +", " ");
+ // actualStr = actualStr.replace("\n", "");
+ if (wantedStr != null) {
+ wantedStr = wantedStr.replace('\t', ' ');
+ wantedStr = wantedStr.replaceAll(" +", " ");
+ // wantedStr = wantedStr.replace("\n", "");
+ } */
if (!actualStr.equals(wantedStr)) {
System.out.println("\n\n////////////////////////////////////////////////////////////////////////");
diff --git a/Examples/test-suite/java/doxygen_misc_constructs_runme.java b/Examples/test-suite/java/doxygen_misc_constructs_runme.java
index 0879d26db..7f29f9b5f 100644
--- a/Examples/test-suite/java/doxygen_misc_constructs_runme.java
+++ b/Examples/test-suite/java/doxygen_misc_constructs_runme.java
@@ -26,129 +26,126 @@ public class doxygen_misc_constructs_runme {
HashMap<String, String> wantedComments = new HashMap<String, String>();
wantedComments.put("doxygen_misc_constructs.doxygen_misc_constructs.getConnection()",
- " \n" +
- " \n" +
- " This function returns connection id. \n" +
- " \n" +
+ "\n" +
+ "\n" +
+ " This function returns connection id.\n" +
+ "\n" +
"");
wantedComments.put("doxygen_misc_constructs.doxygen_misc_constructs.getAddress(doxygen_misc_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" +
+ " 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_misc_constructs.doxygen_misc_constructs.getG_zipCode()",
- " Tag endlink must be recognized also when it is the last token \n" +
- " in the commment. \n" +
+ " Tag endlink must be recognized also when it is the last token\n" +
+ " in the commment.\n" +
" \n" +
- " {@link Connection::getId() }<br> \n" +
+ " {@link Connection::getId() }<br>\n" +
" {@link debugIdeTraceProfilerCoverageSample.py Python example. }\n" +
- " \n" +
+ "\n" +
"");
wantedComments.put("doxygen_misc_constructs.doxygen_misc_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" +
+ " 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" +
+ "\n" +
"");
wantedComments.put("doxygen_misc_constructs.doxygen_misc_constructs.getG_counter()",
- " Tag endlink must be recognized also when followed by nonspace charater. \n" +
- " \n" +
- " {@link Connection::getId() }<br> \n" +
- " \n" +
+ " Tag endlink must be recognized also when followed by nonspace charater.\n" +
+ "\n" +
+ " {@link Connection::getId() }<br>\n" +
+ "\n" +
"");
wantedComments.put("doxygen_misc_constructs.doxygen_misc_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" +
+ " 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_misc_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:\\\\myWinIDEA\\\\connect.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" +
+ " 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:\\\\myWinIDEA\\\\connect.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_misc_constructs.doxygen_misc_constructs.getAddress(doxygen_misc_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" +
+ " 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_misc_constructs.doxygen_misc_constructs.setG_counter(char)",
- " Tag endlink must be recognized also when followed by nonspace charater. \n" +
- " \n" +
- " {@link Connection::getId() }<br> \n" +
- " \n" +
+ " Tag endlink must be recognized also when followed by nonspace charater.\n" +
+ "\n" +
+ " {@link Connection::getId() }<br>\n" +
+ "\n" +
"");
wantedComments.put("doxygen_misc_constructs.ClassWithNestedEnum",
" Class description.\n" +
- " \n");
+ "\n");
wantedComments.put("doxygen_misc_constructs.ClassWithNestedEnum.ENested",
" Enum description.\n" +
- " \n");
+ "\n");
wantedComments.put("doxygen_misc_constructs.ClassWithNestedEnum.ENested.ONE",
- " desc of one\n" +
- " \n");
+ " desc of one\n");
wantedComments.put("doxygen_misc_constructs.ClassWithNestedEnum.ENested.TWO",
- " desc of two\n" +
- " \n");
+ " desc of two\n");
wantedComments.put("doxygen_misc_constructs.ClassWithNestedEnum.ENested.THREE",
- " desc of three\n" +
- " \n");
+ " desc of three\n");
wantedComments.put("doxygen_misc_constructs.doxygen_misc_constructs.isNoSpaceValidA()",
- " This comment without space after '*' is valid in Doxygen. \n" +
- " \n" +
+ " This comment without space after '*' is valid in Doxygen.\n" +
+ "\n" +
"");
wantedComments.put("doxygen_misc_constructs.doxygen_misc_constructs.isNoSpaceValidB()",
- " .This comment without space after '*' is valid in Doxygen. \n" +
- " \n" +
+ " .This comment without space after '*' is valid in Doxygen.\n" +
+ "\n" +
"");
wantedComments.put("doxygen_misc_constructs.doxygen_misc_constructs.backslashA()",
" Backslash following<code>word</code> is a valid doxygen command. Output contains\n" +
- " 'followingword' with 'word' in code font. \n" +
- " \n" +
+ " 'followingword' with 'word' in code font.\n" +
+ "\n" +
"");
wantedComments.put("doxygen_misc_constructs.doxygen_misc_constructs.backslashB()",
" Doxy command without trailing space is ignored - nothing appears\n" +
- " on output. Standalone \\ and '\\' get to output. \n" +
- " Standalone @ and '@' get to output. \n" +
- " Commands \"in quoted \\b strings are treated as plain text\". \n" +
- " Commands not recognized by Doxygen are ignored. \n" +
- " Backslashes in DOS paths d: and words \n" +
- " following them do not appear on output, we must quote them with \n" +
- " double quotes: \"d:\\xyz\\qwe\\myfile\", \"@something\". Single quotes do not help: \n" +
- " 'd: '. Escaping works: d:\\xyz\\qwe\\myfile. Unix \n" +
- " paths of course have no such problems: /xyz/qwe/myfile \n" +
+ " on output. Standalone \\ and '\\' get to output.\n" +
+ " Standalone @ and '@' get to output.\n" +
+ " Commands \"in quoted \\b strings are treated as plain text\".\n" +
+ " Commands not recognized by Doxygen are ignored.\n" +
+ " Backslashes in DOS paths d:and words\n" +
+ " following them do not appear on output, we must quote them with\n" +
+ " double quotes: \"d:\\xyz\\qwe\\myfile\", \"@something\". Single quotes do not help:\n" +
+ " 'd:'. Escaping works: d:\\xyz\\qwe\\myfile. Unix\n" +
+ " paths of course have no such problems: /xyz/qwe/myfile\n" +
" Commands for escaped symbols:\n" +
" $ @ \\ &amp; ~ &lt; &gt; # % &quot; . :: @text ::text" +
- " \n");
+ "\n");
wantedComments.put("doxygen_misc_constructs.doxygen_misc_constructs.backslashC()",
" Backslash e at end of <i>line</i> froze SWIG\n" +
diff --git a/Source/DoxygenTranslator/src/JavaDocConverter.cpp b/Source/DoxygenTranslator/src/JavaDocConverter.cpp
index db024f302..db5ba7e34 100644
--- a/Source/DoxygenTranslator/src/JavaDocConverter.cpp
+++ b/Source/DoxygenTranslator/src/JavaDocConverter.cpp
@@ -56,7 +56,6 @@ void JavaDocConverter::fillStaticTables() {
*
* entities must be translated - remain in Java, something meaningfull in Python (&lt, ...)
*
- * - crash if link in @see tag is split to two lines
* - whitespaces in tests
* - Python
* - add comments also to auto-generated methods lilke equals(), delete() in Java,