即使所有测试都通过,也会返回错误值

时间:2016-05-19 16:01:17

标签: googletest

我有一个C ++ googletests(gmock 1.6.0)项目,该项目通过所有测试但偶尔会返回错误值-1073740940而不是预期的0。

我已经将googletest项目作为后期构建步骤执行,这是输出的结束:

148>  [----------] Global test environment tear-down
148>  [==========] 343 tests from 32 test cases ran. (190 ms total)
148>  [  PASSED  ] 343 tests.
148>  
148>    YOU HAVE 2 DISABLED TESTS
148>  
148>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppCommon.targets(134,5): error MSB3073: The command "IF [%NO_RUN_TESTS%] EQU [] ("Win32\Release\Tests.exe")
148>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppCommon.targets(134,5): error MSB3073: :VCEnd" exited with code -1073740940.

这里是主要的():

int main(int argc, char **argv) 
{
    testing::InitGoogleTest(&argc, argv);
    return RUN_ALL_TESTS();
}

当所有测试通过时,什么可能导致它返回非零?有没有办法阻止它发生?

0 个答案:

没有答案
相关问题