From e46e1655cd592658b6738b10d3ee1a1a82022dc2 Mon Sep 17 00:00:00 2001 From: John McFarland Date: Sat, 2 Nov 2019 10:29:25 -0500 Subject: [PATCH] Minor workaround in doxygen_basic_translate_style3 test With the "///" doxygen comment style, comments within a code block do not get handled correctly. Modifying the test to remove this case and adding a note about it for future reference. --- Examples/test-suite/doxygen_basic_translate_style3.i | 9 ++++++++- .../java/doxygen_basic_translate_style3_runme.java | 2 +- .../python/doxygen_basic_translate_style3_runme.py | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/Examples/test-suite/doxygen_basic_translate_style3.i b/Examples/test-suite/doxygen_basic_translate_style3.i index 5222cfb6f..e364b164f 100644 --- a/Examples/test-suite/doxygen_basic_translate_style3.i +++ b/Examples/test-suite/doxygen_basic_translate_style3.i @@ -49,11 +49,18 @@ void function3(int a, int b) /// \code /// int main() { while(true); } /// -/// // Test blank line in code block +/// int testBlankLine() {} /// \endcode /// \endif void function4() { + // Note: a comment in the above code block will not get processed + // correctly with this doxygen comment style, because + // DoxygenParser::tokenizeDoxygenComment strips out the leading + // comment characters. Whereas it works in the other doxygen + // comment styles (as shown in the other variations of + // doxygen_basic_translate), this test is modified to remove the + // comment within the code block. } diff --git a/Examples/test-suite/java/doxygen_basic_translate_style3_runme.java b/Examples/test-suite/java/doxygen_basic_translate_style3_runme.java index af74c4f03..e450eb757 100644 --- a/Examples/test-suite/java/doxygen_basic_translate_style3_runme.java +++ b/Examples/test-suite/java/doxygen_basic_translate_style3_runme.java @@ -55,7 +55,7 @@ public class doxygen_basic_translate_style3_runme { " {@code \n" + "int main() { while(true); } \n" + "\n" + - "// Test blank line in code block \n" + + "int testBlankLine() {} \n" + " }\n" + " }\n" + " \n" + diff --git a/Examples/test-suite/python/doxygen_basic_translate_style3_runme.py b/Examples/test-suite/python/doxygen_basic_translate_style3_runme.py index dc513d2e0..aa9b6ca4e 100644 --- a/Examples/test-suite/python/doxygen_basic_translate_style3_runme.py +++ b/Examples/test-suite/python/doxygen_basic_translate_style3_runme.py @@ -49,7 +49,7 @@ Warning: This may not work as expected int main() { while(true); } - // Test blank line in code block + int testBlankLine() {} }""" ) comment_verifier.check(inspect.getdoc(doxygen_basic_translate_style3.function5),