mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-10-07 04:02:23 +03:00
GoogleTest: Fix unit test arg parsing
This commit is contained in:
1 parent
0807adfafe
commit
dc26cdf9a9
1 file changed
+3
-4
@@ -20,11 +20,10 @@ int main(int argc, char* argv[])
|
||||
{
|
||||
::testing::InitGoogleTest(&argc, argv);
|
||||
|
||||
if (argc > 1) {
|
||||
if (argv[1] != std::string("--forceFail")) {
|
||||
throw "Unexpected argument";
|
||||
for (int i = 0; i < argc; ++i) {
|
||||
if (argv[i] == std::string("--forceFail")) {
|
||||
shouldFail = true;
|
||||
}
|
||||
shouldFail = true;
|
||||
}
|
||||
return RUN_ALL_TESTS();
|
||||
}
|
||||
Reference in new issue
Block a user