mirror of
https://github.com/open-source-parsers/jsoncpp.git
synced 2025-05-17 19:31:35 +02:00
Fix gcc -Wall warnings (patch from Matt McCormick)
This commit is contained in:
parent
42321f24a6
commit
f8715856f3
@ -190,7 +190,7 @@ namespace JsonTest {
|
|||||||
checkEqual( TestResult &result, const T &expected, const U &actual,
|
checkEqual( TestResult &result, const T &expected, const U &actual,
|
||||||
const char *file, unsigned int line, const char *expr )
|
const char *file, unsigned int line, const char *expr )
|
||||||
{
|
{
|
||||||
if ( expected != actual )
|
if ( static_cast< U >( expected ) != actual )
|
||||||
{
|
{
|
||||||
result.addFailure( file, line, expr );
|
result.addFailure( file, line, expr );
|
||||||
result << "Expected: " << expected << "\n";
|
result << "Expected: " << expected << "\n";
|
||||||
@ -229,8 +229,7 @@ namespace JsonTest {
|
|||||||
result_->predicateStackTail_ = &_minitest_Context; \
|
result_->predicateStackTail_ = &_minitest_Context; \
|
||||||
(expr); \
|
(expr); \
|
||||||
result_->popPredicateContext(); \
|
result_->popPredicateContext(); \
|
||||||
} \
|
}
|
||||||
*result_
|
|
||||||
|
|
||||||
/// \brief Asserts that two values are equals.
|
/// \brief Asserts that two values are equals.
|
||||||
#define JSONTEST_ASSERT_EQUAL( expected, actual ) \
|
#define JSONTEST_ASSERT_EQUAL( expected, actual ) \
|
||||||
|
@ -63,8 +63,8 @@ struct ValueTest : JsonTest::TestCase
|
|||||||
: emptyArray_( Json::arrayValue )
|
: emptyArray_( Json::arrayValue )
|
||||||
, emptyObject_( Json::objectValue )
|
, emptyObject_( Json::objectValue )
|
||||||
, integer_( 123456789 )
|
, integer_( 123456789 )
|
||||||
, smallUnsignedInteger_( Json::Value::UInt( Json::Value::maxInt ) )
|
|
||||||
, unsignedInteger_( 34567890u )
|
, unsignedInteger_( 34567890u )
|
||||||
|
, smallUnsignedInteger_( Json::Value::UInt( Json::Value::maxInt ) )
|
||||||
, real_( 1234.56789 )
|
, real_( 1234.56789 )
|
||||||
, float_( 0.00390625f )
|
, float_( 0.00390625f )
|
||||||
, emptyString_( "" )
|
, emptyString_( "" )
|
||||||
|
Loading…
x
Reference in New Issue
Block a user