Macros | |
#define | GTEST_TEST(test_suite_name, test_name) |
#define | TEST(test_suite_name, test_name) GTEST_TEST(test_suite_name, test_name) |
#define | TEST_F(test_fixture, test_name) |
#define | FRIEND_TEST(test_suite_name, test_name) friend class test_suite_name##_##test_name##_Test |
#define FRIEND_TEST | ( | test_suite_name, | |
test_name | |||
) | friend class test_suite_name##_##test_name##_Test |
Defines a test case from a test suite as a friend class of an implementation class.
FRIEND_TEST
is discouraged, because it induces coupling between testing and implementation code. Consider this a last resort only.[in] | test_suite_name | The name of the test suite to befriend. |
[in] | test_name | The name of the test case to befriend. |
#define GTEST_TEST | ( | test_suite_name, | |
test_name | |||
) |
Alias for TEST
.
#define TEST | ( | test_suite_name, | |
test_name | |||
) | GTEST_TEST(test_suite_name, test_name) |
Defines a test given the suite name and test case name.
If TEST
is conflicting with other code, set GTEST_DONT_DEFINE_TEST
to 1 and use GTEST_TEST
instead.
[in] | test_suite_name | The name of the test suite or collection of tests. |
[in] | test_name | The name of the test case. |
#define TEST_F | ( | test_fixture, | |
test_name | |||
) |
Defines a test case using a test fixture.
TEST_F
may allocate fixtures separately from the stack. Large variables should be stored in test fixture fields, rather than stack variables. This allows the test framework to statically ensure that enough space is available to store these variables.[in] | test_fixture | The name of the test fixture class to use. |
[in] | test_name | The name of the test case. |