MCPcopy Create free account
hub / github.com/PyMesh/PyMesh / EqFailure

Function EqFailure

tests/external/gmock-1.7.0/gtest/src/gtest.cc:1000–1020  ·  view source on GitHub ↗

Constructs and returns the message for an equality assertion (e.g. ASSERT_EQ, EXPECT_STREQ, etc) failure. The first four parameters are the expressions used in the assertion and their values, as strings. For example, for ASSERT_EQ(foo, bar) where foo is 5 and bar is 6, we have: expected_expression: "foo" actual_expression: "bar" expected_value: "5" actual_value: "6" The ignoring_

Source from the content-addressed store, hash-verified

998// *_STRCASEEQ*. When it's true, the string " (ignoring case)" will
999// be inserted into the message.
1000AssertionResult EqFailure(const char* expected_expression,
1001 const char* actual_expression,
1002 const std::string& expected_value,
1003 const std::string& actual_value,
1004 bool ignoring_case) {
1005 Message msg;
1006 msg << "Value of: " << actual_expression;
1007 if (actual_value != actual_expression) {
1008 msg << "\n Actual: " << actual_value;
1009 }
1010
1011 msg << "\nExpected: " << expected_expression;
1012 if (ignoring_case) {
1013 msg << " (ignoring case)";
1014 }
1015 if (expected_value != expected_expression) {
1016 msg << "\nWhich is: " << expected_value;
1017 }
1018
1019 return AssertionFailure() << msg;
1020}
1021
1022// Constructs a failure message for Boolean assertions such as EXPECT_TRUE.
1023std::string GetBoolAssertionFailureMessage(

Callers 6

CmpHelperEQFunction · 0.70
gtest.ccFile · 0.70
CmpHelperSTREQFunction · 0.70
TESTFunction · 0.50
CmpHelperEQFunction · 0.50
CmpHelperFloatingPointEQFunction · 0.50

Calls 1

AssertionFailureFunction · 0.70

Tested by

no test coverage detected