Compilation fix for VsnprintfTestCase with Catch
Rewrite an assert using "||" as 2 asserts to allow it compile with Catch (this wasn't detected before as this code is only compiled when using our own vsnprintf() implementation, which is usually not the case).
This commit is contained in:
@@ -552,8 +552,10 @@ void VsnprintfTestCase::DoMisc(
|
|||||||
std::string errMsg(errStr.mb_str());
|
std::string errMsg(errStr.mb_str());
|
||||||
std::string overflowMsg(overflowStr.mb_str());
|
std::string overflowMsg(overflowStr.mb_str());
|
||||||
|
|
||||||
CPPUNIT_ASSERT_MESSAGE(errMsg,
|
if ( size_t(n) < max )
|
||||||
(expectedLen == -1 && size_t(n) >= max) || expectedLen == n);
|
CPPUNIT_ASSERT_MESSAGE(errMsg, expectedLen == n);
|
||||||
|
else
|
||||||
|
CPPUNIT_ASSERT_MESSAGE(errMsg, expectedLen == -1);
|
||||||
|
|
||||||
CPPUNIT_ASSERT_MESSAGE(errMsg, expectedString == buf);
|
CPPUNIT_ASSERT_MESSAGE(errMsg, expectedString == buf);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user