Skip to content

Commit b0eebfa

Browse files
committed
fix syntax of std/json_test.zig
See #663
1 parent d172e3f commit b0eebfa

File tree

1 file changed

+9
-27
lines changed

1 file changed

+9
-27
lines changed

std/json_test.zig

+9-27
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,7 @@ test "y_array_with_several_null" {
8181
}
8282

8383
test "y_array_with_trailing_space" {
84-
ok(
85-
"[2] "
86-
);
84+
ok("[2] ");
8785
}
8886

8987
test "y_number_0e+1" {
@@ -579,9 +577,7 @@ test "y_structure_true_in_array" {
579577
}
580578

581579
test "y_structure_whitespace_array" {
582-
ok(
583-
" [] "
584-
);
580+
ok(" [] ");
585581
}
586582

587583
////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -696,7 +692,6 @@ test "n_array_newlines_unclosed" {
696692
);
697693
}
698694

699-
700695
test "n_array_number_and_comma" {
701696
err(
702697
\\[1,]
@@ -971,7 +966,6 @@ test "n_number_invalid-utf-8-in-int" {
971966
);
972967
}
973968

974-
975969
test "n_number_++" {
976970
err(
977971
\\[++1234]
@@ -1228,7 +1222,7 @@ test "n_object_unterminated-value" {
12281222
err(
12291223
\\{"a":"a
12301224
);
1231-
}
1225+
}
12321226

12331227
test "n_object_with_single_string" {
12341228
err(
@@ -1243,9 +1237,7 @@ test "n_object_with_trailing_garbage" {
12431237
}
12441238

12451239
test "n_single_space" {
1246-
err(
1247-
" "
1248-
);
1240+
err(" ");
12491241
}
12501242

12511243
test "n_string_1_surrogate_then_escape" {
@@ -1279,9 +1271,7 @@ test "n_string_accentuated_char_no_quotes" {
12791271
}
12801272

12811273
test "n_string_backslash_00" {
1282-
err(
1283-
\\["\"]
1284-
);
1274+
err("[\"\x00\"]");
12851275
}
12861276

12871277
test "n_string_escaped_backslash_bad" {
@@ -1291,9 +1281,7 @@ test "n_string_escaped_backslash_bad" {
12911281
}
12921282

12931283
test "n_string_escaped_ctrl_char_tab" {
1294-
err(
1295-
\\["\ "]
1296-
);
1284+
err("\x5b\x22\x5c\x09\x22\x5d");
12971285
}
12981286

12991287
test "n_string_escaped_emoji" {
@@ -1416,9 +1404,7 @@ test "n_string_with_trailing_garbage" {
14161404
}
14171405

14181406
test "n_structure_100000_opening_arrays" {
1419-
err(
1420-
"[" ** 100000
1421-
);
1407+
err("[" ** 100000);
14221408
}
14231409

14241410
test "n_structure_angle_bracket_." {
@@ -1558,9 +1544,7 @@ test "n_structure_open_array_comma" {
15581544
}
15591545

15601546
test "n_structure_open_array_object" {
1561-
err(
1562-
"[{\"\":" ** 50000
1563-
);
1547+
err("[{\"\":" ** 50000);
15641548
}
15651549

15661550
test "n_structure_open_array_open_object" {
@@ -1900,9 +1884,7 @@ test "i_string_UTF8_surrogate_U+D800" {
19001884
}
19011885

19021886
test "i_structure_500_nested_arrays" {
1903-
any(
1904-
("[" ** 500) ++ ("]" ** 500)
1905-
);
1887+
any(("[" ** 500) ++ ("]" ** 500));
19061888
}
19071889

19081890
test "i_structure_UTF-8_BOM_empty_object" {

0 commit comments

Comments
 (0)