Add Doxygen test for constant and fix JavaDoc indentation

This commit is contained in:
William S Fulton 2018-06-16 22:36:08 +01:00
commit ecc66fdcbd
3 changed files with 9 additions and 1 deletions

View file

@ -36,6 +36,11 @@ struct SomeStruct
*/
int someVar=42;
/**
* The constant comment
*/
#define CONSTANT_VALUE 4242
class SomeAnotherClass
{
public:

View file

@ -125,6 +125,9 @@ public class doxygen_parsing_runme {
wantedComments.put("doxygen_parsing.SomeAnotherClass.setClassAttr2(int)",
"The class attribute post-comment \n" +
"");
wantedComments.put("doxygen_parsing.doxygen_parsingConstants.CONSTANT_VALUE",
"The constant comment \n" +
"");
// and ask the parser to check comments for us
System.exit(parser.check(wantedComments));

View file

@ -1558,7 +1558,7 @@ public:
// Translate and write javadoc comment if flagged
if (doxygen && doxygenTranslator->hasDocumentation(n)) {
String *doxygen_comments = doxygenTranslator->getDocumentation(n, 0);
String *doxygen_comments = doxygenTranslator->getDocumentation(n, " ");
if (comment_creation_chatter)
Printf(constants_code, "/* This was generated from constantWrapper() */\n");
Printv(constants_code, Char(doxygen_comments), NIL);