diff options
author | Abseil Team <absl-team@google.com> | 2019-10-23 14:09:41 -0400 |
---|---|---|
committer | Gennadiy Civil <misterg@google.com> | 2019-10-23 15:54:45 -0400 |
commit | 37f322783175a66c11785d17fc153477b0777753 (patch) | |
tree | 150b5f66287ef6a7bd1d381e9de61af5b0dea952 /googletest/scripts/gen_gtest_pred_impl.py | |
parent | 1110c471cadf9cf40cb735890d67f135d6313471 (diff) | |
download | googletest-37f322783175a66c11785d17fc153477b0777753.tar.gz googletest-37f322783175a66c11785d17fc153477b0777753.tar.bz2 googletest-37f322783175a66c11785d17fc153477b0777753.zip |
Googletest export
Add a matcher `testing::ReturnRoundRobin` which, on each call, returns the next element in the sequence, restarting at the beginning once it has reached the end.
PiperOrigin-RevId: 276312136
Diffstat (limited to 'googletest/scripts/gen_gtest_pred_impl.py')
-rwxr-xr-x | googletest/scripts/gen_gtest_pred_impl.py | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/googletest/scripts/gen_gtest_pred_impl.py b/googletest/scripts/gen_gtest_pred_impl.py index b43efdf4..72942779 100755 --- a/googletest/scripts/gen_gtest_pred_impl.py +++ b/googletest/scripts/gen_gtest_pred_impl.py @@ -111,6 +111,8 @@ def HeaderPreamble(n): // '%(command)s'. DO NOT EDIT BY HAND! // // Implements a family of generic predicate assertion macros. +// GOOGLETEST_CM0001 DO NOT DELETE + #ifndef GTEST_INCLUDE_GTEST_GTEST_PRED_IMPL_H_ #define GTEST_INCLUDE_GTEST_GTEST_PRED_IMPL_H_ @@ -246,8 +248,10 @@ AssertionResult AssertPred%(n)sHelper(const char* pred_text""" % DEFS impl += ' << ") evaluates to false, where"' - impl += Iter(n, """ - << "\\n" << e%s << " evaluates to " << v%s""") + impl += Iter( + n, """ + << "\\n" << e%s << " evaluates to " << ::testing::PrintToString(v%s)""" + ) impl += """; } @@ -510,7 +514,7 @@ struct PredFormatFunctor%(n)s { class Predicate%(n)sTest : public testing::Test { protected: - virtual void SetUp() { + void SetUp() override { expected_to_finish_ = true; finished_ = false;""" % DEFS @@ -520,7 +524,7 @@ class Predicate%(n)sTest : public testing::Test { """ tests += """ - virtual void TearDown() { + void TearDown() override { // Verifies that each of the predicate's arguments was evaluated // exactly once.""" @@ -588,7 +592,7 @@ typedef Predicate%(n)sTest ASSERT_PRED%(n)sTest; if use_assert: assrt = 'ASSERT' # 'assert' is reserved, so we cannot use - # that identifier here. + # that identifier here. else: assrt = 'EXPECT' |