Added test case to check Doxygen comments parsing, including java and python runtime tests
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2012-doxygen@13150 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
ac6b51f13e
commit
e3f41f32a6
5 changed files with 195 additions and 2 deletions
19
Examples/test-suite/python/doxygen_parsing_runme.py
Normal file
19
Examples/test-suite/python/doxygen_parsing_runme.py
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
#!/usr/bin/python
|
||||
|
||||
import doxygen_parsing
|
||||
import sys
|
||||
import re
|
||||
|
||||
def check(got, expected):
|
||||
if not re.match(str(expected), str(got)):
|
||||
raise RuntimeError("\n" + "Expected: [" + str(expected) + "]\n" + "Got : [" + str(got) + "]")
|
||||
|
||||
check(doxygen_parsing.simpleFunction.__doc__, '\s+This is simple comment for a function\s+')
|
||||
check(doxygen_parsing.CSimpleClass.__doc__, '\s+This is simple comment for a class\s+')
|
||||
check(doxygen_parsing.CSimpleClass.simpleMethod.__doc__, '\s+Simple method\s+')
|
||||
check(doxygen_parsing.CSimpleClass.simpleMethodWithParameter.__doc__, ''
|
||||
'\s+Simple method with parameter'
|
||||
'\s+Arguments:\s+param \(int\)\s+-- Some test param\s+'
|
||||
)
|
||||
check(doxygen_parsing.CTemplateClassInt.__doc__, '\s+Comment for template class\s+')
|
||||
check(doxygen_parsing.CTemplateClassInt.templateMethod.__doc__, '\s+Template method\s+')
|
||||
Loading…
Add table
Add a link
Reference in a new issue