summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorshiqian <shiqian@861a406c-534a-0410-8894-cb66d6ee9925>2008-10-11 07:20:02 +0000
committershiqian <shiqian@861a406c-534a-0410-8894-cb66d6ee9925>2008-10-11 07:20:02 +0000
commite44602ec83c65102035ce5304ae8de0cb16e9e56 (patch)
tree975905bb872df284353ddfc50f930f48979ec4d3 /scripts
parent9210e179469ec720af19da6ad9a4656eb096d8e7 (diff)
downloadgtest-e44602ec83c65102035ce5304ae8de0cb16e9e56.tar.gz
gtest-e44602ec83c65102035ce5304ae8de0cb16e9e56.tar.bz2
gtest-e44602ec83c65102035ce5304ae8de0cb16e9e56.tar.xz
Many changes:
- appends "_" to internal macro names (by Markus Heule). - makes Google Test work with newer versions of tools on Symbian and Windows CE (by Mika Raento). - adds the (ASSERT|EXPECT)_NO_FATAL_FAILURE macros (by Markus Heule). - changes EXPECT_(NON|)FATAL_FAILURE to catch failures in the current thread only (by Markus Heule). - adds the EXPECT_(NON|)FATAL_FAILURE_ON_ALL_THREADS macros (by Markus Heule). - adds GTEST_HAS_PTHREAD and GTEST_IS_THREADSAFE to indicate the availability of <pthread.h> and Google Test's thread-safety (by Zhanyong Wan). - adds scons/SConscript for building with scons (by Joi Sigurdsson). - adds src/gtest-all.cc for building Google Test from a single file (by Markus Heule). - updates the xcode project to include new tests (by Preston Jackson). git-svn-id: http://googletest.googlecode.com/svn/trunk@104 861a406c-534a-0410-8894-cb66d6ee9925
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/gen_gtest_pred_impl.py30
1 files changed, 15 insertions, 15 deletions
diff --git a/scripts/gen_gtest_pred_impl.py b/scripts/gen_gtest_pred_impl.py
index 7cb31da..d1b2f25 100755
--- a/scripts/gen_gtest_pred_impl.py
+++ b/scripts/gen_gtest_pred_impl.py
@@ -149,11 +149,11 @@ def HeaderPreamble(n):
// Please email googletestframework@googlegroups.com if you need
// support for higher arities.
-// GTEST_ASSERT is the basic statement to which all of the assertions
+// GTEST_ASSERT_ is the basic statement to which all of the assertions
// in this file reduce. Don't use this in your code.
-#define GTEST_ASSERT(expression, on_failure) \\
- GTEST_AMBIGUOUS_ELSE_BLOCKER \\
+#define GTEST_ASSERT_(expression, on_failure) \\
+ GTEST_AMBIGUOUS_ELSE_BLOCKER_ \\
if (const ::testing::AssertionResult gtest_ar = (expression)) \\
; \\
else \\
@@ -257,35 +257,35 @@ AssertionResult AssertPred%(n)sHelper(const char* pred_text""" % DEFS
// Internal macro for implementing {EXPECT|ASSERT}_PRED_FORMAT%(n)s.
// Don't use this in your code.
-#define GTEST_PRED_FORMAT%(n)s(pred_format, %(vs)s, on_failure)\\
- GTEST_ASSERT(pred_format(%(vts)s, %(vs)s),\\
- on_failure)
+#define GTEST_PRED_FORMAT%(n)s_(pred_format, %(vs)s, on_failure)\\
+ GTEST_ASSERT_(pred_format(%(vts)s, %(vs)s),\\
+ on_failure)
// Internal macro for implementing {EXPECT|ASSERT}_PRED%(n)s. Don't use
// this in your code.
-#define GTEST_PRED%(n)s(pred, %(vs)s, on_failure)\\
- GTEST_ASSERT(::testing::AssertPred%(n)sHelper(#pred""" % DEFS
+#define GTEST_PRED%(n)s_(pred, %(vs)s, on_failure)\\
+ GTEST_ASSERT_(::testing::AssertPred%(n)sHelper(#pred""" % DEFS
impl += Iter(n, """, \\
- #v%s""")
+ #v%s""")
impl += """, \\
- pred"""
+ pred"""
impl += Iter(n, """, \\
- v%s""")
+ v%s""")
impl += """), on_failure)
// %(Arity)s predicate assertion macros.
#define EXPECT_PRED_FORMAT%(n)s(pred_format, %(vs)s) \\
- GTEST_PRED_FORMAT%(n)s(pred_format, %(vs)s, GTEST_NONFATAL_FAILURE)
+ GTEST_PRED_FORMAT%(n)s_(pred_format, %(vs)s, GTEST_NONFATAL_FAILURE_)
#define EXPECT_PRED%(n)s(pred, %(vs)s) \\
- GTEST_PRED%(n)s(pred, %(vs)s, GTEST_NONFATAL_FAILURE)
+ GTEST_PRED%(n)s_(pred, %(vs)s, GTEST_NONFATAL_FAILURE_)
#define ASSERT_PRED_FORMAT%(n)s(pred_format, %(vs)s) \\
- GTEST_PRED_FORMAT%(n)s(pred_format, %(vs)s, GTEST_FATAL_FAILURE)
+ GTEST_PRED_FORMAT%(n)s_(pred_format, %(vs)s, GTEST_FATAL_FAILURE_)
#define ASSERT_PRED%(n)s(pred, %(vs)s) \\
- GTEST_PRED%(n)s(pred, %(vs)s, GTEST_FATAL_FAILURE)
+ GTEST_PRED%(n)s_(pred, %(vs)s, GTEST_FATAL_FAILURE_)
""" % DEFS