diff --git a/src/test_lib_json/jsontest.cpp b/src/test_lib_json/jsontest.cpp index 02e7b21..13d1e35 100644 --- a/src/test_lib_json/jsontest.cpp +++ b/src/test_lib_json/jsontest.cpp @@ -275,6 +275,25 @@ TestResult::operator << ( unsigned int value ) } +#ifdef JSON_HAS_INT64 +TestResult & +TestResult::operator << ( Json::Int64 value ) +{ + char buffer[32]; + sprintf( buffer, "%lld", value ); + return addToLastFailure( buffer ); +} + +TestResult & +TestResult::operator << ( Json::UInt64 value ) +{ + char buffer[32]; + sprintf( buffer, "%ull", value ); + return addToLastFailure( buffer ); +} +#endif + + TestResult & TestResult::operator << ( double value ) { diff --git a/src/test_lib_json/jsontest.h b/src/test_lib_json/jsontest.h index 0d07238..5d0eb1a 100644 --- a/src/test_lib_json/jsontest.h +++ b/src/test_lib_json/jsontest.h @@ -87,6 +87,10 @@ namespace JsonTest { TestResult &operator << ( bool value ); TestResult &operator << ( int value ); TestResult &operator << ( unsigned int value ); +#ifdef JSON_HAS_INT64 + TestResult &operator << ( Json::Int64 value ); + TestResult &operator << ( Json::UInt64 value ); +#endif TestResult &operator << ( double value ); TestResult &operator << ( const char *value ); TestResult &operator << ( const std::string &value ); @@ -229,6 +233,7 @@ namespace JsonTest { #define JSONTEST_ASSERT_STRING_EQUAL( expected, actual ) \ JsonTest::checkStringEqual( *result_, \ std::string(expected), std::string(actual), \ + __FILE__, __LINE__, \ #expected " == " #actual ) /// \brief Begin a fixture test case.