#!/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' '' '