E D R , A S I H C RSS

Cxx Test

http://cxxtest.sourceforge.net
C++ 는 부 . CUT C UnitTestFramework Perl 등 Runner 를 는 방 .

CxxUnit CUT C++ .(CxxUnit ) Python Perl , Runner 만들. .


1002 CxxUnit . 를 Visual Studio Tools( External Tools) . Tool 뒤, . (cxxtestgen.py 는 CxxTest .) Test .

~cpp 
from os import *
from os.path import *

def toStr(aList):
    return ' '.join(aList)

def main():
    testFiles = []
    for eachFile in listdir("."):
        if isfile(eachFile):
            lastestPeriod = eachFile.rfind(".")
            fileName = eachFile[:lastestPeriod]
            extension = eachFile[lastestPeriod+1:]
            if fileName.endswith("Test"):
                print fileName, extension 
                testFiles.append(eachFile)
    '''cmd= "python cxxtestgen.py --runner=ParenPrinter --gui=Win32Gui -o runner.cpp "+toStr(testFiles)'''

    cmd= "python cxxtestgen.py --runner=ParenPrinter -o runner.cpp "+toStr(testFiles)
    print cmd
    system(cmd)

if __name__=="__main__":
    main()


. MockObject 만들 RealObject 를 만들 . ( ) .
Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2021-02-07 05:23:04
Processing time 0.0109 sec