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

Function CmpHelperEQ

tests/external/gmock-1.7.0/gtest/include/gtest/gtest.h:1438–1461  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1436// The helper function for {ASSERT|EXPECT}_EQ.
1437template <typename T1, typename T2>
1438AssertionResult CmpHelperEQ(const char* expected_expression,
1439 const char* actual_expression,
1440 const T1& expected,
1441 const T2& actual) {
1442#ifdef _MSC_VER
1443# pragma warning(push) // Saves the current warning state.
1444# pragma warning(disable:4389) // Temporarily disables warning on
1445 // signed/unsigned mismatch.
1446#endif
1447
1448 if (expected == actual) {
1449 return AssertionSuccess();
1450 }
1451
1452#ifdef _MSC_VER
1453# pragma warning(pop) // Restores the warning state.
1454#endif
1455
1456 return EqFailure(expected_expression,
1457 actual_expression,
1458 FormatForComparisonFailureMessage(expected, actual),
1459 FormatForComparisonFailureMessage(actual, expected),
1460 false);
1461}
1462
1463// With this overloaded version, we allow anonymous enums to be used
1464// in {ASSERT|EXPECT}_EQ when compiled with gcc 4, as anonymous enums

Callers 2

CompareMethod · 0.70
CompareMethod · 0.70

Calls 3

AssertionSuccessFunction · 0.50
EqFailureFunction · 0.50

Tested by

no test coverage detected