Tests can not run in gtest runner
I try to run a gtest project in gtest runner.but nothing happened.No logs and errors. Is there any demo project can help?
main.cpp:
#include "stdafx.h" #include "gtest\gtest.h" #include "Test.h"
int main(int argc, _TCHAR* argv[]) { testing::InitGoogleTest(&argc, argv); return RUN_ALL_TESTS(); } Test.cpp:
#include "stdafx.h" #include "Test.h"
TEST(Test, Success) { EXPECT_EQ(0, 0); }
TEST(Test, Failure) { EXPECT_EQ(0, 2); }
@nholthaus
I'm not sure what you mean by 'run a gtest project'. Just to be clear, gtest-runner runs compiled executable files (.exe), not source code. Additionally, if your test executable crashes, there isn't anything gtest-runner can do about that.
If you run the executable stand-alone (in a command window) do you get the expected results?
Thank you for reply! I compiled an executable file with codes above and got expected results.But it cound not run with gest runner. I found that gtest runner pass an xml file to executable but it was not generated.