summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorzhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925>2010-09-27 22:09:42 +0000
committerzhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925>2010-09-27 22:09:42 +0000
commit3928282cf0323a42e85e7885bddc54409021166f (patch)
tree1732afebaad166ad92ad2f0a12ed3327b891e626 /scripts
parent375ce98f43aebcc1bd702cf9fcb860788e5cb820 (diff)
downloadgtest-3928282cf0323a42e85e7885bddc54409021166f.tar.gz
gtest-3928282cf0323a42e85e7885bddc54409021166f.tar.bz2
gtest-3928282cf0323a42e85e7885bddc54409021166f.tar.xz
Removes uses of deprecated AssertionFailure() API (by Vlad Losev).
git-svn-id: http://googletest.googlecode.com/svn/trunk@487 861a406c-534a-0410-8894-cb66d6ee9925
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/gen_gtest_pred_impl.py13
1 files changed, 5 insertions, 8 deletions
diff --git a/scripts/gen_gtest_pred_impl.py b/scripts/gen_gtest_pred_impl.py
index 39bb6cf..d35b4f0 100755
--- a/scripts/gen_gtest_pred_impl.py
+++ b/scripts/gen_gtest_pred_impl.py
@@ -238,21 +238,19 @@ AssertionResult AssertPred%(n)sHelper(const char* pred_text""" % DEFS
impl += """) {
if (pred(%(vs)s)) return AssertionSuccess();
- Message msg;
""" % DEFS
- impl += ' msg << pred_text << "("'
+ impl += ' return AssertionFailure() << pred_text << "("'
impl += Iter(n, """
- << e%s""", sep=' << ", "')
+ << e%s""", sep=' << ", "')
impl += ' << ") evaluates to false, where"'
impl += Iter(n, """
- << "\\n" << e%s << " evaluates to " << v%s""")
+ << "\\n" << e%s << " evaluates to " << v%s""")
impl += """;
- return AssertionFailure(msg);
}
// Internal macro for implementing {EXPECT|ASSERT}_PRED_FORMAT%(n)s.
@@ -478,15 +476,14 @@ testing::AssertionResult PredFormatFunction%(n)s(""" % DEFS
if (PredFunction%(n)s(%(vs)s))
return testing::AssertionSuccess();
- testing::Message msg;
- msg << """ % DEFS
+ return testing::AssertionFailure()
+ << """ % DEFS
tests += Iter(n, 'e%s', sep=' << " + " << ')
tests += """
<< " is expected to be positive, but evaluates to "
<< %(v_sum)s << ".";
- return testing::AssertionFailure(msg);
}
""" % DEFS