summaryrefslogtreecommitdiff
path: root/test
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 /test
parent375ce98f43aebcc1bd702cf9fcb860788e5cb820 (diff)
downloadgoogletest-3928282cf0323a42e85e7885bddc54409021166f.tar.gz
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 'test')
-rw-r--r--test/gtest_pred_impl_unittest.cc27
1 files changed, 11 insertions, 16 deletions
diff --git a/test/gtest_pred_impl_unittest.cc b/test/gtest_pred_impl_unittest.cc
index 66c75d1..35dc9bc 100644
--- a/test/gtest_pred_impl_unittest.cc
+++ b/test/gtest_pred_impl_unittest.cc
@@ -27,7 +27,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// This file is AUTOMATICALLY GENERATED on 10/02/2008 by command
+// This file is AUTOMATICALLY GENERATED on 09/24/2010 by command
// 'gen_gtest_pred_impl.py 5'. DO NOT EDIT BY HAND!
// Regression test for gtest_pred_impl.h
@@ -103,11 +103,10 @@ testing::AssertionResult PredFormatFunction1(const char* e1,
if (PredFunction1(v1))
return testing::AssertionSuccess();
- testing::Message msg;
- msg << e1
+ return testing::AssertionFailure()
+ << e1
<< " is expected to be positive, but evaluates to "
<< v1 << ".";
- return testing::AssertionFailure(msg);
}
// A unary predicate-formatter functor.
@@ -494,11 +493,10 @@ testing::AssertionResult PredFormatFunction2(const char* e1,
if (PredFunction2(v1, v2))
return testing::AssertionSuccess();
- testing::Message msg;
- msg << e1 << " + " << e2
+ return testing::AssertionFailure()
+ << e1 << " + " << e2
<< " is expected to be positive, but evaluates to "
<< v1 + v2 << ".";
- return testing::AssertionFailure(msg);
}
// A binary predicate-formatter functor.
@@ -927,11 +925,10 @@ testing::AssertionResult PredFormatFunction3(const char* e1,
if (PredFunction3(v1, v2, v3))
return testing::AssertionSuccess();
- testing::Message msg;
- msg << e1 << " + " << e2 << " + " << e3
+ return testing::AssertionFailure()
+ << e1 << " + " << e2 << " + " << e3
<< " is expected to be positive, but evaluates to "
<< v1 + v2 + v3 << ".";
- return testing::AssertionFailure(msg);
}
// A ternary predicate-formatter functor.
@@ -1402,11 +1399,10 @@ testing::AssertionResult PredFormatFunction4(const char* e1,
if (PredFunction4(v1, v2, v3, v4))
return testing::AssertionSuccess();
- testing::Message msg;
- msg << e1 << " + " << e2 << " + " << e3 << " + " << e4
+ return testing::AssertionFailure()
+ << e1 << " + " << e2 << " + " << e3 << " + " << e4
<< " is expected to be positive, but evaluates to "
<< v1 + v2 + v3 + v4 << ".";
- return testing::AssertionFailure(msg);
}
// A 4-ary predicate-formatter functor.
@@ -1919,11 +1915,10 @@ testing::AssertionResult PredFormatFunction5(const char* e1,
if (PredFunction5(v1, v2, v3, v4, v5))
return testing::AssertionSuccess();
- testing::Message msg;
- msg << e1 << " + " << e2 << " + " << e3 << " + " << e4 << " + " << e5
+ return testing::AssertionFailure()
+ << e1 << " + " << e2 << " + " << e3 << " + " << e4 << " + " << e5
<< " is expected to be positive, but evaluates to "
<< v1 + v2 + v3 + v4 + v5 << ".";
- return testing::AssertionFailure(msg);
}
// A 5-ary predicate-formatter functor.