fix(CppUnit): CppUnit notEqualsMessage causing compile errors #3615

This commit is contained in:
Alex Fabijanic 2022-05-29 11:46:33 -05:00
parent a17a7bf027
commit 980cd0273b
2 changed files with 6 additions and 4 deletions

View File

@ -124,7 +124,9 @@ protected:
long data2LineNumber = CppUnitException::CPPUNIT_UNKNOWNLINENUMBER,
const std::string& fileName = CppUnitException::CPPUNIT_UNKNOWNFILENAME);
template <typename T1, typename T2>
template <typename T1, typename T2,
typename = typename std::enable_if<std::is_arithmetic<T1>::value, T1>::type,
typename = typename std::enable_if<std::is_arithmetic<T2>::value, T2>::type>
void assertEquals(T1 expected,
T2 actual,
long lineNumber = CppUnitException::CPPUNIT_UNKNOWNLINENUMBER,

View File

@ -44,9 +44,9 @@ void WinServiceTest::testServiceReturnsFailureActionConfigured()
auto failureActions = spoolerService.getFailureActions();
assertEqual(3, static_cast<int>(failureActions.size()));
assertEqual(WinService::SVC_RESTART, failureActions[0]);
assertEqual(WinService::SVC_RESTART, failureActions[1]);
assertEqual(WinService::SVC_NONE, failureActions[2]);
assertTrue(WinService::SVC_RESTART == failureActions[0]);
assertTrue(WinService::SVC_RESTART == failureActions[1]);
assertTrue(WinService::SVC_NONE == failureActions[2]);
}