diff options
author | zhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925> | 2009-03-06 20:05:23 +0000 |
---|---|---|
committer | zhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925> | 2009-03-06 20:05:23 +0000 |
commit | 40e72a8a837b47cbfe2e695068c1845073ab2630 (patch) | |
tree | ce6c72890e27b3215259bedcf7ddb9e28eff4544 /src/gtest-internal-inl.h | |
parent | 4984c93490eeeb7d3d1979b30a39a21cad07cba5 (diff) | |
download | googletest-40e72a8a837b47cbfe2e695068c1845073ab2630.tar.gz googletest-40e72a8a837b47cbfe2e695068c1845073ab2630.tar.bz2 googletest-40e72a8a837b47cbfe2e695068c1845073ab2630.zip |
Implements --gtest_throw_on_failure for using gtest with other testing frameworks.
Diffstat (limited to 'src/gtest-internal-inl.h')
-rw-r--r-- | src/gtest-internal-inl.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gtest-internal-inl.h b/src/gtest-internal-inl.h index eadcf95e..de5124d7 100644 --- a/src/gtest-internal-inl.h +++ b/src/gtest-internal-inl.h @@ -84,6 +84,7 @@ const char kListTestsFlag[] = "list_tests"; const char kOutputFlag[] = "output"; const char kPrintTimeFlag[] = "print_time"; const char kRepeatFlag[] = "repeat"; +const char kThrowOnFailureFlag[] = "throw_on_failure"; // This class saves the values of all Google Test flags in its c'tor, and // restores them in its d'tor. @@ -103,6 +104,7 @@ class GTestFlagSaver { output_ = GTEST_FLAG(output); print_time_ = GTEST_FLAG(print_time); repeat_ = GTEST_FLAG(repeat); + throw_on_failure_ = GTEST_FLAG(throw_on_failure); } // The d'tor is not virtual. DO NOT INHERIT FROM THIS CLASS. @@ -119,6 +121,7 @@ class GTestFlagSaver { GTEST_FLAG(output) = output_; GTEST_FLAG(print_time) = print_time_; GTEST_FLAG(repeat) = repeat_; + GTEST_FLAG(throw_on_failure) = throw_on_failure_; } private: // Fields for saving the original values of flags. @@ -135,6 +138,7 @@ class GTestFlagSaver { bool print_time_; bool pretty_; internal::Int32 repeat_; + bool throw_on_failure_; } GTEST_ATTRIBUTE_UNUSED_; // Converts a Unicode code point to a narrow string in UTF-8 encoding. |