| 18329 | // The helper function for {ASSERT|EXPECT}_EQ. |
| 18330 | template <typename T1, typename T2> |
| 18331 | AssertionResult CmpHelperEQ(const char* expected_expression, |
| 18332 | const char* actual_expression, |
| 18333 | const T1& expected, |
| 18334 | const T2& actual) { |
| 18335 | #ifdef _MSC_VER |
| 18336 | # pragma warning(push) // Saves the current warning state. |
| 18337 | # pragma warning(disable:4389) // Temporarily disables warning on |
| 18338 | // signed/unsigned mismatch. |
| 18339 | #endif |
| 18340 | |
| 18341 | if (expected == actual) { |
| 18342 | return AssertionSuccess(); |
| 18343 | } |
| 18344 | |
| 18345 | #ifdef _MSC_VER |
| 18346 | # pragma warning(pop) // Restores the warning state. |
| 18347 | #endif |
| 18348 | |
| 18349 | return EqFailure(expected_expression, |
| 18350 | actual_expression, |
| 18351 | FormatForComparisonFailureMessage(expected, actual), |
| 18352 | FormatForComparisonFailureMessage(actual, expected), |
| 18353 | false); |
| 18354 | } |
| 18355 | |
| 18356 | // With this overloaded version, we allow anonymous enums to be used |
| 18357 | // in {ASSERT|EXPECT}_EQ when compiled with gcc 4, as anonymous enums |
no test coverage detected