@@ -1819,7 +1819,7 @@ JSONTEST_FIXTURE_LOCAL(ValueTest, StaticString) {
1819
1819
1820
1820
JSONTEST_FIXTURE_LOCAL (ValueTest, WideString) {
1821
1821
// https://github.com/open-source-parsers/jsoncpp/issues/756
1822
- const std::string uni = u8" 式,进 " ; // "\u5f0f\uff0c\u8fdb "
1822
+ const std::string uni = u8" \u5f0f\uff0c\u8fdb " ; // "式,进 "
1823
1823
std::string styled;
1824
1824
{
1825
1825
Json::Value v;
@@ -2655,13 +2655,13 @@ struct ReaderTest : JsonTest::TestCase {
2655
2655
void checkStructuredErrors (
2656
2656
const std::vector<Json::Reader::StructuredError>& actual,
2657
2657
const std::vector<Json::Reader::StructuredError>& expected) {
2658
- JSONTEST_ASSERT_EQUAL (actual .size (), expected .size ());
2658
+ JSONTEST_ASSERT_EQUAL (expected .size (), actual .size ());
2659
2659
for (size_t i = 0 ; i < actual.size (); ++i) {
2660
2660
const auto & a = actual[i];
2661
2661
const auto & e = expected[i];
2662
- JSONTEST_ASSERT_EQUAL (a .offset_start , e .offset_start ) << i;
2663
- JSONTEST_ASSERT_EQUAL (a .offset_limit , e .offset_limit ) << i;
2664
- JSONTEST_ASSERT_EQUAL (a .message , e .message ) << i;
2662
+ JSONTEST_ASSERT_EQUAL (e .offset_start , a .offset_start ) << i;
2663
+ JSONTEST_ASSERT_EQUAL (e .offset_limit , a .offset_limit ) << i;
2664
+ JSONTEST_ASSERT_EQUAL (e .message , a .message ) << i;
2665
2665
}
2666
2666
}
2667
2667
@@ -2682,7 +2682,7 @@ struct ReaderTest : JsonTest::TestCase {
2682
2682
const std::vector<Json::Reader::StructuredError>& structured,
2683
2683
const std::string& formatted) {
2684
2684
checkParse (input, structured);
2685
- JSONTEST_ASSERT_EQUAL (reader->getFormattedErrorMessages (), formatted );
2685
+ JSONTEST_ASSERT_EQUAL (formatted, reader->getFormattedErrorMessages ());
2686
2686
}
2687
2687
2688
2688
std::unique_ptr<Json::Reader> reader{new Json::Reader ()};
@@ -2771,8 +2771,8 @@ JSONTEST_FIXTURE_LOCAL(ReaderTest, parseWithNoErrorsTestingOffsets) {
2771
2771
R"( "false" : false)"
2772
2772
R"( })" );
2773
2773
auto checkOffsets = [&](const Json::Value& v, int start, int limit) {
2774
- JSONTEST_ASSERT_EQUAL (v.getOffsetStart (), start );
2775
- JSONTEST_ASSERT_EQUAL (v.getOffsetLimit (), limit );
2774
+ JSONTEST_ASSERT_EQUAL (start, v.getOffsetStart ());
2775
+ JSONTEST_ASSERT_EQUAL (limit, v.getOffsetLimit ());
2776
2776
};
2777
2777
checkOffsets (root, 0 , 115 );
2778
2778
checkOffsets (root[" property" ], 15 , 34 );
@@ -2817,9 +2817,8 @@ JSONTEST_FIXTURE_LOCAL(ReaderTest, strictModeParseNumber) {
2817
2817
}
2818
2818
2819
2819
JSONTEST_FIXTURE_LOCAL (ReaderTest, parseChineseWithOneError) {
2820
- // \u4f50\u85e4 佐藤
2821
2820
checkParse (R"( { "pr)"
2822
- " 佐藤 "
2821
+ u8" \u4f50\u85e4 " // 佐藤
2823
2822
R"( erty" :: "value" })" ,
2824
2823
{{18 , 19 , " Syntax error: value, object or array expected." }},
2825
2824
" * Line 1, Column 19\n Syntax error: value, object or array "
@@ -2921,7 +2920,7 @@ JSONTEST_FIXTURE_LOCAL(CharReaderTest, parseString) {
2921
2920
bool ok = reader->parse (doc, doc + std::strlen (doc), &root, &errs);
2922
2921
JSONTEST_ASSERT (ok);
2923
2922
JSONTEST_ASSERT (errs.empty ());
2924
- JSONTEST_ASSERT_EQUAL (" 訪 " , root[0 ].asString ()); // "\u8A2a "
2923
+ JSONTEST_ASSERT_EQUAL (u8" \u8A2a " , root[0 ].asString ()); // "訪 "
2925
2924
}
2926
2925
{
2927
2926
char const doc[] = " [ \"\\ uD801\" ]" ;
@@ -3633,8 +3632,8 @@ JSONTEST_FIXTURE_LOCAL(IteratorTest, distance) {
3633
3632
}
3634
3633
{
3635
3634
Json::Value empty;
3636
- JSONTEST_ASSERT_EQUAL (empty.end () - empty.end (), 0 );
3637
- JSONTEST_ASSERT_EQUAL (empty.end () - empty.begin (), 0 );
3635
+ JSONTEST_ASSERT_EQUAL (0 , empty.end () - empty.end ());
3636
+ JSONTEST_ASSERT_EQUAL (0 , empty.end () - empty.begin ());
3638
3637
}
3639
3638
}
3640
3639
0 commit comments