47using testing::GTEST_FLAG(death_test_style);
48using testing::GTEST_FLAG(filter);
49using testing::GTEST_FLAG(repeat);
55#define GTEST_CHECK_INT_EQ_(expected, actual) \
57 const int expected_val = (expected);\
58 const int actual_val = (actual);\
59 if (::testing::internal::IsTrue(expected_val != actual_val)) {\
60 ::std::cout << "Value of: " #actual "\n"\
61 << " Actual: " << actual_val << "\n"\
62 << "Expected: " #expected "\n"\
63 << "Which is: " << expected_val << "\n";\
64 ::testing::internal::posix::Abort();\
66 } while (::testing::internal::AlwaysFalse())
72int g_environment_set_up_count = 0;
73int g_environment_tear_down_count = 0;
78 virtual void SetUp() { g_environment_set_up_count++; }
79 virtual void TearDown() { g_environment_tear_down_count++; }
84int g_should_fail_count = 0;
86TEST(FooTest, ShouldFail) {
87 g_should_fail_count++;
93int g_should_pass_count = 0;
95TEST(FooTest, ShouldPass) {
96 g_should_pass_count++;
102int g_death_test_count = 0;
104TEST(BarDeathTest, ThreadSafeAndFast) {
105 g_death_test_count++;
114int g_param_test_count = 0;
116const int kNumberOfParamTests = 10;
120TEST_P(MyParamTest, ShouldPass) {
124 g_param_test_count++;
132 g_environment_set_up_count = 0;
133 g_environment_tear_down_count = 0;
134 g_should_fail_count = 0;
135 g_should_pass_count = 0;
136 g_death_test_count = 0;
137 g_param_test_count = 0;
141void CheckCounts(
int expected) {
151void TestRepeatUnspecified() {
158void TestRepeat(
int repeat) {
168void TestRepeatWithEmptyFilter(
int repeat) {
179void TestRepeatWithFilterForSuccessfulTests(
int repeat) {
195void TestRepeatWithFilterForFailedTests(
int repeat) {
216 TestRepeatUnspecified();
221 TestRepeatWithEmptyFilter(2);
222 TestRepeatWithEmptyFilter(3);
224 TestRepeatWithFilterForSuccessfulTests(3);
226 TestRepeatWithFilterForFailedTests(4);
#define EXPECT_DEATH_IF_SUPPORTED(statement, regex)
#define INSTANTIATE_TEST_CASE_P(prefix, test_case_name, generator,...)
#define TEST_P(test_case_name, test_name)
#define GTEST_DECLARE_string_(name)
#define GTEST_DECLARE_int32_(name)
#define EXPECT_EQ(val1, val2)
int RUN_ALL_TESTS() GTEST_MUST_USE_RESULT_
#define TEST(test_case_name, test_name)
#define GTEST_CHECK_INT_EQ_(expected, actual)
Environment * AddGlobalTestEnvironment(Environment *env)
internal::ParamGenerator< T > Range(T start, T end, IncrementT step)
GTEST_API_ void InitGoogleTest(int *argc, char **argv)