destinshine 2015-06-02 05:20 采纳率: 100%
浏览 3101
已采纳

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这个软件挺难找到教程的,现在很苦手啊

  • 写回答

5条回答

  • Bruce Jia(上海) 2015-06-05 00:41
    关注

    它有什么优点?我没用过。用过的有cppunit, catch和gtest. cppunit比较重量级,catch是超级轻量级的只有一个头文件。

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(4条)

报告相同问题?

悬赏问题

  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 保护模式-系统加载-段寄存器