Fixed and updated all doxygen python tests
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2012-doxygen@13346 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
4c293c8282
commit
8a683e42d0
4 changed files with 562 additions and 24 deletions
148
Examples/test-suite/python/doxygen_translate_runme.py
Normal file
148
Examples/test-suite/python/doxygen_translate_runme.py
Normal file
|
|
@ -0,0 +1,148 @@
|
|||
#!/usr/bin/python
|
||||
|
||||
import doxygen_translate
|
||||
import string
|
||||
import sys
|
||||
|
||||
def check(got, expected):
|
||||
#if got is Null
|
||||
# raise RuntimeError('Expected comment string\n')
|
||||
gotStr = string.replace(got, ' ', '')
|
||||
gotStr = string.replace(gotStr, '\n', '')
|
||||
gotStr = string.replace(gotStr, '\t', '')
|
||||
expectedStr = string.replace(expected, ' ', '')
|
||||
expectedStr = string.replace(expectedStr, '\n', '')
|
||||
expectedStr = string.replace(expectedStr, '\t', '')
|
||||
if not gotStr == expectedStr:
|
||||
raise RuntimeError("Expected: [" + str(expected) + "]\n" + "Got : [" + str(got) + "]\n")
|
||||
|
||||
check(doxygen_translate.function.__doc__, ''
|
||||
' _Hello_'
|
||||
''
|
||||
' -some list item '
|
||||
''
|
||||
' Authors:'
|
||||
' lots of them '
|
||||
''
|
||||
' Zubr '
|
||||
''
|
||||
' __boldword__'
|
||||
''
|
||||
' codeword'
|
||||
''
|
||||
' \'citationword\''
|
||||
''
|
||||
' some test code '
|
||||
''
|
||||
' Conditional comment: SOMECONDITION'
|
||||
' Some conditional comment '
|
||||
' End of conditional comment.'
|
||||
''
|
||||
' Copyright:'
|
||||
' some copyright '
|
||||
''
|
||||
' Deprecated:'
|
||||
' Now use another function '
|
||||
''
|
||||
' _italicword_'
|
||||
''
|
||||
' Example:'
|
||||
' someFile.txt'
|
||||
' Some details on using the example '
|
||||
''
|
||||
' Throws:'
|
||||
' SuperError'
|
||||
''
|
||||
' If: ANOTHERCONDITION {'
|
||||
' First part of comment '
|
||||
' If: SECONDCONDITION {'
|
||||
' Nested condition text '
|
||||
' }Else if: THIRDCONDITION {'
|
||||
' The third condition text '
|
||||
' }Else: {The last text block '
|
||||
' }'
|
||||
' }Else: {Second part of comment '
|
||||
' If: CONDITION {'
|
||||
' Second part extended '
|
||||
' }'
|
||||
' }'
|
||||
''
|
||||
' If not: SOMECONDITION {'
|
||||
' This is printed if not '
|
||||
' }'
|
||||
''
|
||||
' Image: htmltestImage.bmpHello, world!asd=10qwe'
|
||||
''
|
||||
' <ul> '
|
||||
''
|
||||
' -Some unordered list '
|
||||
' -With lots of items '
|
||||
' -lots of lots of items '
|
||||
''
|
||||
' </ul> '
|
||||
''
|
||||
' someMember Some description follows '
|
||||
''
|
||||
' Notes:'
|
||||
' Here '
|
||||
' is the note! '
|
||||
''
|
||||
' This is an overloaded member function, provided for convenience.'
|
||||
' It differs from the above function only in what argument(s) it accepts.'
|
||||
''
|
||||
' someword'
|
||||
''
|
||||
' superPackage'
|
||||
''
|
||||
' Title: The paragraph title '
|
||||
' The paragraph text. '
|
||||
' Maybe even multiline '
|
||||
''
|
||||
' Arguments:'
|
||||
' a (int) -- the first param '
|
||||
''
|
||||
' Remarks:'
|
||||
' Some remark text '
|
||||
''
|
||||
' Another remarks section '
|
||||
''
|
||||
' Return:'
|
||||
' Whatever '
|
||||
''
|
||||
' it '
|
||||
''
|
||||
' may return '
|
||||
''
|
||||
' See also:'
|
||||
' someOtherMethod '
|
||||
''
|
||||
' function '
|
||||
''
|
||||
' Since:'
|
||||
' version 0.0.0.1 '
|
||||
''
|
||||
' Throws:'
|
||||
' superException'
|
||||
''
|
||||
' RuntimeError'
|
||||
''
|
||||
' TODO:'
|
||||
' Some very important task '
|
||||
''
|
||||
' Arguments:'
|
||||
' b (float) -- B is mentioned again... '
|
||||
''
|
||||
' very long '
|
||||
' text with tags <sometag> '
|
||||
''
|
||||
' Version:'
|
||||
' 0.0.0.2 '
|
||||
''
|
||||
' Warning:'
|
||||
' This is senseless! '
|
||||
''
|
||||
' Here goes test of symbols: '
|
||||
' $@\&~<>#%".::'
|
||||
''
|
||||
' And here goes simple text '
|
||||
)
|
||||
Loading…
Add table
Add a link
Reference in a new issue