Fixed compilation issues with MSVC 6: replace usage of ostringstream with valueToString to support 64 bits integer and high precision floating point conversion to string. Replace usage of ULL and LL literal with UInt64(expr) and Int64(expr). Introduced helper function uint64ToDouble() to work-around missing conversion. Unit tests do not pass yet.

This commit is contained in:
Baptiste Lepilleur
2011-05-26 22:55:24 +00:00
parent f0b24e705f
commit f587e6a420
4 changed files with 111 additions and 67 deletions

View File

@@ -249,6 +249,23 @@ TestResult::addToLastFailure( const std::string &message )
return *this;
}
TestResult &
TestResult::operator << ( Json::Int64 value ) {
return addToLastFailure( Json::valueToString(value) );
}
TestResult &
TestResult::operator << ( Json::UInt64 value ) {
return addToLastFailure( Json::valueToString(value) );
}
TestResult &
TestResult::operator << ( bool value ) {
return addToLastFailure(value ? "true" : "false");
}
// class TestCase
// //////////////////////////////////////////////////////////////////