diff options
author | zhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925> | 2010-09-27 22:09:42 +0000 |
---|---|---|
committer | zhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925> | 2010-09-27 22:09:42 +0000 |
commit | 2d1835b086e69570e4c3e0ad6197da509bd0a957 (patch) | |
tree | 1732afebaad166ad92ad2f0a12ed3327b891e626 /test | |
parent | b5d3a17805fe0ed2ccde463412ae1fd206c4df21 (diff) | |
download | googletest-2d1835b086e69570e4c3e0ad6197da509bd0a957.tar.gz googletest-2d1835b086e69570e4c3e0ad6197da509bd0a957.tar.bz2 googletest-2d1835b086e69570e4c3e0ad6197da509bd0a957.zip |
Removes uses of deprecated AssertionFailure() API (by Vlad Losev).
Diffstat (limited to 'test')
-rw-r--r-- | test/gtest_pred_impl_unittest.cc | 27 |
1 files changed, 11 insertions, 16 deletions
diff --git a/test/gtest_pred_impl_unittest.cc b/test/gtest_pred_impl_unittest.cc index 66c75d17..35dc9bcf 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. |