GoogleTest: Fix unit test arg parsing

This commit is contained in:
Máté Ferenc Nagy-Egri committed 2026-02-23 18:04:51 +01:00
1 parent 0807adfafe
commit dc26cdf9a9
1 file changed
+3 -4
+3 -4
View File
@@ -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();
}