You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
450 B

#include <string>
#include <gtest/gtest.h>
namespace {
bool shouldFail = false;
}
TEST(GoogleTest, LinksAndRuns)
{
ASSERT_TRUE(true);
}
TEST(GoogleTest, ConditionalFail)
{
ASSERT_FALSE(shouldFail);
}
int main(int argc, char* argv[])
{
::testing::InitGoogleTest(&argc, argv);
if (argc > 1) {
if (argv[1] != std::string("--forceFail")) {
throw "Unexpected argument";
}
shouldFail = true;
}
return RUN_ALL_TESTS();
}