Add doxygen testing of Java constructor wrappers
This commit is contained in:
parent
9cc05724ef
commit
602b0d5a2c
6 changed files with 20 additions and 4 deletions
|
|
@ -7,6 +7,7 @@
|
||||||
struct DoxOuter {
|
struct DoxOuter {
|
||||||
/** DoxOuter constructor */
|
/** DoxOuter constructor */
|
||||||
DoxOuter() {}
|
DoxOuter() {}
|
||||||
|
/** DoxInner class description */
|
||||||
struct DoxInner {
|
struct DoxInner {
|
||||||
/** DoxInner constructor */
|
/** DoxInner constructor */
|
||||||
DoxInner() {}
|
DoxInner() {}
|
||||||
|
|
|
||||||
|
|
@ -41,6 +41,7 @@ int someVar=42;
|
||||||
*/
|
*/
|
||||||
#define CONSTANT_VALUE 4242
|
#define CONSTANT_VALUE 4242
|
||||||
|
|
||||||
|
/// SomeAnotherClass description
|
||||||
class SomeAnotherClass
|
class SomeAnotherClass
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
|
||||||
|
|
@ -34,6 +34,10 @@ public class CommentParser {
|
||||||
if (f.getRawCommentText().length() > 0)
|
if (f.getRawCommentText().length() > 0)
|
||||||
m_parsedComments.put(f.qualifiedName(), f.getRawCommentText());
|
m_parsedComments.put(f.qualifiedName(), f.getRawCommentText());
|
||||||
}
|
}
|
||||||
|
for (ConstructorDoc c : classDoc.constructors()) {
|
||||||
|
if (c.getRawCommentText().length() > 0)
|
||||||
|
m_parsedComments.put(c.toString(), c.getRawCommentText());
|
||||||
|
}
|
||||||
for (MethodDoc m : classDoc.methods()) {
|
for (MethodDoc m : classDoc.methods()) {
|
||||||
if (m.getRawCommentText().length() > 0)
|
if (m.getRawCommentText().length() > 0)
|
||||||
m_parsedComments.put(m.toString(), m.getRawCommentText());
|
m_parsedComments.put(m.toString(), m.getRawCommentText());
|
||||||
|
|
|
||||||
|
|
@ -25,10 +25,12 @@ public class doxygen_nested_class_runme {
|
||||||
|
|
||||||
HashMap<String, String> wantedComments = new HashMap<String, String>();
|
HashMap<String, String> wantedComments = new HashMap<String, String>();
|
||||||
|
|
||||||
// wantedComments.put("doxygen_nested_class.DoxOuter.DoxOuter()",
|
wantedComments.put("doxygen_nested_class.DoxOuter()",
|
||||||
// " DoxOuter constructor ");
|
" DoxOuter constructor ");
|
||||||
// wantedComments.put("doxygen_nested_class.DoxOuter.DoxInner.DoxInner()",
|
wantedComments.put("doxygen_nested_class.DoxOuter.DoxInner",
|
||||||
// " DoxInner constructor ");
|
" DoxInner class description ");
|
||||||
|
wantedComments.put("doxygen_nested_class.DoxOuter.DoxInner()",
|
||||||
|
" DoxInner constructor ");
|
||||||
wantedComments.put("doxygen_nested_class.DoxOuter.DoxInner.setDoxInt(int)",
|
wantedComments.put("doxygen_nested_class.DoxOuter.DoxInner.setDoxInt(int)",
|
||||||
" doxInt variable ");
|
" doxInt variable ");
|
||||||
wantedComments.put("doxygen_nested_class.DoxOuter.DoxInner.getDoxInt()",
|
wantedComments.put("doxygen_nested_class.DoxOuter.DoxInner.getDoxInt()",
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,12 @@ public class doxygen_parsing_runme {
|
||||||
|
|
||||||
HashMap<String, String> wantedComments = new HashMap<String, String>();
|
HashMap<String, String> wantedComments = new HashMap<String, String>();
|
||||||
|
|
||||||
|
wantedComments.put("doxygen_parsing.SomeAnotherClass",
|
||||||
|
" SomeAnotherClass description");
|
||||||
|
wantedComments.put("doxygen_parsing.SomeAnotherClass(int)",
|
||||||
|
" First overloaded constructor.");
|
||||||
|
wantedComments.put("doxygen_parsing.SomeAnotherClass(java.lang.String)",
|
||||||
|
" Second overloaded constructor.");
|
||||||
wantedComments.put("doxygen_parsing.SomeAnotherClass.getClassAttr()",
|
wantedComments.put("doxygen_parsing.SomeAnotherClass.getClassAttr()",
|
||||||
" The class attribute comment \n" +
|
" The class attribute comment \n" +
|
||||||
" \n" +
|
" \n" +
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,8 @@ comment_verifier.check(inspect.getdoc(doxygen_parsing.SomeClass),
|
||||||
"The class comment")
|
"The class comment")
|
||||||
comment_verifier.check(inspect.getdoc(doxygen_parsing.SomeStruct),
|
comment_verifier.check(inspect.getdoc(doxygen_parsing.SomeStruct),
|
||||||
"The struct comment")
|
"The struct comment")
|
||||||
|
comment_verifier.check(inspect.getdoc(doxygen_parsing.SomeAnotherClass),
|
||||||
|
"SomeAnotherClass description")
|
||||||
|
|
||||||
# There doesn't seem to be any way to specify the doc string for __init__ when
|
# There doesn't seem to be any way to specify the doc string for __init__ when
|
||||||
# using "-builtin" (see http://stackoverflow.com/q/11913492/15275), so skip
|
# using "-builtin" (see http://stackoverflow.com/q/11913492/15275), so skip
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue