mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-09-25 04:09:36 +03:00
30 lines
434 B
C++
30 lines
434 B
C++
#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);
|
|
|
|
for (int i = 0; i < argc; ++i) {
|
|
if (argv[i] == std::string("--forceFail")) {
|
|
shouldFail = true;
|
|
}
|
|
}
|
|
return RUN_ALL_TESTS();
|
|
}
|