OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "net/http2/tools/failure.h" |
| 6 |
| 7 namespace net { |
| 8 namespace test { |
| 9 |
| 10 // This is a copy of the same named method in ::testing::internal. |
| 11 // TODO(jamessynge): See about getting something like VERIFY_* adopted by |
| 12 // gUnit (probably a very difficult task!). |
| 13 std::string GetBoolAssertionFailureMessage( |
| 14 const ::testing::AssertionResult& assertion_result, |
| 15 const char* expression_text, |
| 16 const char* actual_predicate_value, |
| 17 const char* expected_predicate_value) { |
| 18 const char* actual_message = assertion_result.message(); |
| 19 ::testing::Message msg; |
| 20 msg << "Value of: " << expression_text |
| 21 << "\n Actual: " << actual_predicate_value; |
| 22 if (actual_message[0] != '\0') |
| 23 msg << " (" << actual_message << ")"; |
| 24 msg << "\nExpected: " << expected_predicate_value; |
| 25 return msg.GetString(); |
| 26 } |
| 27 |
| 28 } // namespace test |
| 29 } // namespace net |
OLD | NEW |