| 1436 | // The helper function for {ASSERT|EXPECT}_EQ. |
| 1437 | template <typename T1, typename T2> |
| 1438 | AssertionResult 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 |
no test coverage detected