Fix gcc -Wall warnings (patch from Matt McCormick)

This commit is contained in:
Baptiste Lepilleur 2013-02-18 15:53:47 +00:00
parent 42321f24a6
commit f8715856f3
2 changed files with 3 additions and 4 deletions

View File

@ -190,7 +190,7 @@ namespace JsonTest {
checkEqual( TestResult &result, const T &expected, const U &actual,
const char *file, unsigned int line, const char *expr )
{
if ( expected != actual )
if ( static_cast< U >( expected ) != actual )
{
result.addFailure( file, line, expr );
result << "Expected: " << expected << "\n";
@ -229,8 +229,7 @@ namespace JsonTest {
result_->predicateStackTail_ = &_minitest_Context; \
(expr); \
result_->popPredicateContext(); \
} \
*result_
}
/// \brief Asserts that two values are equals.
#define JSONTEST_ASSERT_EQUAL( expected, actual ) \

View File

@ -63,8 +63,8 @@ struct ValueTest : JsonTest::TestCase
: emptyArray_( Json::arrayValue )
, emptyObject_( Json::objectValue )
, integer_( 123456789 )
, smallUnsignedInteger_( Json::Value::UInt( Json::Value::maxInt ) )
, unsignedInteger_( 34567890u )
, smallUnsignedInteger_( Json::Value::UInt( Json::Value::maxInt ) )
, real_( 1234.56789 )
, float_( 0.00390625f )
, emptyString_( "" )