程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
 程式師世界 >> 編程語言 >> 更多編程語言 >> 編程綜合問答 >> c++-C++Test做單元測試的時候Read Symbola步驟就失敗了

c++-C++Test做單元測試的時候Read Symbola步驟就失敗了

編輯:編程綜合問答
C++Test做單元測試的時候Read Symbola步驟就失敗了

點擊Read Symbols後的運行結果

Precompiling C:\Users\Destin\Desktop\Demo.cpp

Working directory: C:\Users\Destin\Desktop

"D:\Program Files (x86)\VC6.0\VC98\bin\cl.exe" -EHsc -Tp C:\Users\Destin\Desktop\Demo.cpp -FoC:\Users\Destin\C++TestFiles\Projects\DemoTest\Product\Demo.cpp_0\Demo.o -Zi -Od /nologo -c -FdC:\Users\Destin\C++TestFiles\Projects\DemoTest\Product\Demo.cpp_0\DemoMSVC++-6.0.pdb

Process exited with code 0

Precompile done.

Preparing harness directory for C:\Users\Destin\Desktop\Demo.cpp

Preparing harness directory done.

Preparing harness for: C:\Users\Destin\Desktop\Demo.cpp

Working directory: C:\Users\Destin\Desktop

harness.exe -w --compileracronym=MSVC++-6.0 --fileName=C:\Users\Destin\Desktop\Demo.cpp --outputFileName=C:\Users\Destin\C++TestFiles\Projects\DemoTest\Product\Demo.cpp_0\SourceCodeTestCases\TestHarness\Src\Demo_7000.cpp --instrumentation-mode=70 --pre-instr-header-file-name=C:\Users\Destin\C++TestFiles\Projects\DemoTest\Product\Demo.cpp_0\SourceCodeTestCases\TestHarness\Src\Demo_7000.cpp.h --post-instr-header-file-name=C:\Users\Destin\C++TestFiles\Projects\DemoTest\Product\Demo.cpp_0\SourceCodeTestCases\TestHarness\Src\Demo_7000.cpp_instr.h --ignore-path=+* --ignore-path=-*\Demo.h* --ignore-path=-C:\Users\Destin\Desktop\Demo.cpp --pre-include-header=cpptest_defs.h --pre-include-header=cpptest_test_suite_decls.h --post-include-header=cpptest_test_suite_defs.h --symbols-files-list=C:\Users\Destin\C++TestFiles\Projects\DemoTest\Product\Demo.cpp_0\SourceCodeTestCases\TestHarness\Src\harness.out --instr-unit-id=1 "--preprocessorExecutable=D:\Program Files (x86)\VC6.0\VC98\bin\cl.exe" --generate-test-case-templates=true --output-tmpl-dir=C:\Users\Destin\C++TestFiles\Projects\DemoTest\Product\Demo.cpp_0\SourceCodeTestCases\TestHarness\Symbols\TCTmpl --generate-type-initializers=true --user-stubs-header=user_stubs.h --stub-functions-with-ellipsis=true --loggerOption=log4cplus.appender.STDOUT.Threshold=WARN --loggerOption=log4cplus.appender.STDERR.Threshold=WARN

Exception was caught during initialization.

Process exited with code 11

Error: Preparing harness failed for:
C:\Users\Destin\Desktop\Demo.cpp


The following problem(s) occurred during preparing harness:

Error: Preparing harness failed for:

C:\Users\Destin\Desktop\Demo.cpp

代碼:
#include "windows.h"

int Sum(int *pNum1, int *pNum2)
{
return *pNum1 + *pNum2;
}

int main()
{
int nSum;
int Num1,Num2;
Num1 = 1;
Num2 = 2;
nSum = Sum(&Num1,&Num2);
return 0;

}

這描述的是什麼原因?是不是因為我哪裡沒有設置好啊,C++Test這個軟件挺難找到教程的,現在很苦手啊

最佳回答:


它有什麼優點?我沒用過。用過的有cppunit, catch和gtest. cppunit比較重量級,catch是超級輕量級的只有一個頭文件。

  1. 上一頁:
  2. 下一頁:
Copyright © 程式師世界 All Rights Reserved