summaryrefslogtreecommitdiff
path: root/include/gtest/gtest.h
diff options
context:
space:
mode:
authorzhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925>2010-04-13 04:40:32 +0000
committerzhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925>2010-04-13 04:40:32 +0000
commit1618bb491b881bc39faa3317ee8778847646226d (patch)
tree72cb7c19f20a10a700f7720e122b8e42a7ed1fd9 /include/gtest/gtest.h
parentb6c0721acbb659b5fad05b920fbabc3b99203e80 (diff)
downloadgtest-1618bb491b881bc39faa3317ee8778847646226d.tar.gz
gtest-1618bb491b881bc39faa3317ee8778847646226d.tar.bz2
gtest-1618bb491b881bc39faa3317ee8778847646226d.tar.xz
Adds alternative spellings for FAIL, SUCCEED, and TEST.
git-svn-id: http://googletest.googlecode.com/svn/trunk@414 861a406c-534a-0410-8894-cb66d6ee9925
Diffstat (limited to 'include/gtest/gtest.h')
-rw-r--r--include/gtest/gtest.h23
1 files changed, 20 insertions, 3 deletions
diff --git a/include/gtest/gtest.h b/include/gtest/gtest.h
index ee7a8d5..921fad1 100644
--- a/include/gtest/gtest.h
+++ b/include/gtest/gtest.h
@@ -1651,10 +1651,22 @@ const T* TestWithParam<T>::parameter_ = NULL;
#define ADD_FAILURE() GTEST_NONFATAL_FAILURE_("Failed")
// Generates a fatal failure with a generic message.
-#define FAIL() GTEST_FATAL_FAILURE_("Failed")
+#define GTEST_FAIL() GTEST_FATAL_FAILURE_("Failed")
+
+// Define this macro to 1 to omit the definition of FAIL(), which is a
+// generic name and clashes with some other libraries.
+#if !GTEST_DONT_DEFINE_FAIL
+#define FAIL() GTEST_FAIL()
+#endif
// Generates a success with a generic message.
-#define SUCCEED() GTEST_SUCCESS_("Succeeded")
+#define GTEST_SUCCEED() GTEST_SUCCESS_("Succeeded")
+
+// Define this macro to 1 to omit the definition of SUCCEED(), which
+// is a generic name and clashes with some other libraries.
+#if !GTEST_DONT_DEFINE_SUCCEED
+#define SUCCEED() GTEST_SUCCEED()
+#endif
// Macros for testing exceptions.
//
@@ -1986,10 +1998,15 @@ bool StaticAssertTypeEq() {
// code. GetTestTypeId() is guaranteed to always return the same
// value, as it always calls GetTypeId<>() from the Google Test
// framework.
-#define TEST(test_case_name, test_name)\
+#define GTEST_TEST(test_case_name, test_name)\
GTEST_TEST_(test_case_name, test_name, \
::testing::Test, ::testing::internal::GetTestTypeId())
+// Define this macro to 1 to omit the definition of TEST(), which
+// is a generic name and clashes with some other libraries.
+#if !GTEST_DONT_DEFINE_TEST
+#define TEST(test_case_name, test_name) GTEST_TEST(test_case_name, test_name)
+#endif
// Defines a test that uses a test fixture.
//