CppUTest 적용할 때 설정할 것들
1. C/C++-->추가포함 디렉터리
"..\libs\CppUTest\include","..\libs\CppUTest\include\Platforms\VisualCpp"
2. Linker-->추가종속성
"../libs/CppUTest/vs2008/CppUTest.lib"
pragma comment(lib,"...")로는 /MT /MD 옵션이 달라 오류 발생.
3. 프로젝트 종속성 설정
4. TestRunner.cpp 의 _tmain수정.
// TestRunner.cpp // #include "stdafx.h" #include "TestRunner.h" #include "CppUTest/CommandLineTestRunner.h" #ifdef _DEBUG #define new DEBUG_NEW #endif CWinApp theApp; using namespace std; int _tmain(int argc, TCHAR* argv[], TCHAR* envp[]) { /* # http://cpputest.github.io/manual.html ###### -v verbose, print each test name as it runs -r# repeat the tests some number (#) of times, or two times if # is not specified. This is handy if you are experiencing memory leaks. A second run that has no leaks indicates that someone is allocating statics and not releasing them. -g group only run test whose group contains the substring group -n name only run test whose name contains the substring name -ojunit output to JUnit ant plugin style xml files (for CI systems) */ const char* args[] = { "", "-v" }; return CommandLineTestRunner::RunAllTests(2, args); return 0; }















