Skip to content

Commit d704093

Browse files
committed
Fixed issue with json_options array_array_split_lines::new_line
1 parent 47bb0dd commit d704093

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

test/corelib/src/json_options_tests.cpp

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,9 @@ TEST_CASE("object_array with/without line_length_limit")
313313
{
314314
std::string expected = R"({
315315
"foo": ["bar","baz",
316-
[1,2,3]
316+
[
317+
1,2,3
318+
]
317319
],
318320
"qux": [1,2,3,null,123,45.3,342334,234]
319321
})";
@@ -337,7 +339,9 @@ TEST_CASE("object_array with/without line_length_limit")
337339
std::string expected = R"({
338340
"foo": [
339341
"bar","baz",
340-
[1,2,3]
342+
[
343+
1,2,3
344+
]
341345
],
342346
"qux": [
343347
1,2,3,null,123,45.3,342334,234
@@ -396,7 +400,9 @@ TEST_CASE("object_array with/without line_length_limit")
396400
{
397401
std::string expected = R"({
398402
"foo": ["bar","baz",
399-
[1,2,3]
403+
[
404+
1,2,3
405+
]
400406
],
401407
"qux": [1,2,3,null,
402408
123,45.3,342334,
@@ -424,7 +430,9 @@ TEST_CASE("object_array with/without line_length_limit")
424430
std::string expected = R"({
425431
"foo": [
426432
"bar","baz",
427-
[1,2,3]
433+
[
434+
1,2,3
435+
]
428436
],
429437
"qux": [
430438
1,2,3,null,123,
@@ -649,7 +657,7 @@ TEST_CASE("json_options tests")
649657

650658
std::ostringstream os;
651659
j.dump_pretty(os, options);
652-
CHECK(os.str() == s);
660+
CHECK(s == os.str());
653661
}
654662
SECTION("pad_inside_object_braces")
655663
{

0 commit comments

Comments
 (0)