mirror of
https://github.com/Kitware/CMake.git
synced 2026-02-21 06:30:20 -06:00
Run the `clang-format.bash` script to update our C and C++ code to a new include order `.clang-format`. Use `clang-format` version 6.0.
31 lines
450 B
C++
31 lines
450 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);
|
|
|
|
if (argc > 1) {
|
|
if (argv[1] != std::string("--forceFail")) {
|
|
throw "Unexpected argument";
|
|
}
|
|
shouldFail = true;
|
|
}
|
|
return RUN_ALL_TESTS();
|
|
}
|