authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2018-05-29 18:10:36-04:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2018-05-29 18:10:36-04:00
logb0eebfa560b7c05859a535bf46abd8b9cf9306b3
tree5006839a3d05082ab0889f55a5efabc3fe5aec4b
parentd172e3f3bbb61956d8d2202fd008b61f07eb3121

fix syntax of std/json_test.zig

See #663

1 files changed, 9 insertions(+), 27 deletions(-)

std/json_test.zig+9-27
...@@ -81,9 +81,7 @@ test "y_array_with_several_null" {...@@ -81,9 +81,7 @@ test "y_array_with_several_null" {
81}81}
8282
83test "y_array_with_trailing_space" {83test "y_array_with_trailing_space" {
84 ok(84 ok("[2] ");
85 "[2] "
86 );
87}85}
8886
89test "y_number_0e+1" {87test "y_number_0e+1" {
...@@ -579,9 +577,7 @@ test "y_structure_true_in_array" {...@@ -579,9 +577,7 @@ test "y_structure_true_in_array" {
579}577}
580578
581test "y_structure_whitespace_array" {579test "y_structure_whitespace_array" {
582 ok(580 ok(" [] ");
583 " [] "
584 );
585}581}
586582
587////////////////////////////////////////////////////////////////////////////////////////////////////583////////////////////////////////////////////////////////////////////////////////////////////////////
...@@ -696,7 +692,6 @@ test "n_array_newlines_unclosed" {...@@ -696,7 +692,6 @@ test "n_array_newlines_unclosed" {
696 );692 );
697}693}
698694
699
700test "n_array_number_and_comma" {695test "n_array_number_and_comma" {
701 err(696 err(
702 \\[1,]697 \\[1,]
...@@ -971,7 +966,6 @@ test "n_number_invalid-utf-8-in-int" {...@@ -971,7 +966,6 @@ test "n_number_invalid-utf-8-in-int" {
971 );966 );
972}967}
973968
974
975test "n_number_++" {969test "n_number_++" {
976 err(970 err(
977 \\[++1234]971 \\[++1234]
...@@ -1228,7 +1222,7 @@ test "n_object_unterminated-value" {...@@ -1228,7 +1222,7 @@ test "n_object_unterminated-value" {
1228 err(1222 err(
1229 \\{"a":"a1223 \\{"a":"a
1230 );1224 );
1231 }1225}
12321226
1233test "n_object_with_single_string" {1227test "n_object_with_single_string" {
1234 err(1228 err(
...@@ -1243,9 +1237,7 @@ test "n_object_with_trailing_garbage" {...@@ -1243,9 +1237,7 @@ test "n_object_with_trailing_garbage" {
1243}1237}
12441238
1245test "n_single_space" {1239test "n_single_space" {
1246 err(1240 err(" ");
1247 " "
1248 );
1249}1241}
12501242
1251test "n_string_1_surrogate_then_escape" {1243test "n_string_1_surrogate_then_escape" {
...@@ -1279,9 +1271,7 @@ test "n_string_accentuated_char_no_quotes" {...@@ -1279,9 +1271,7 @@ test "n_string_accentuated_char_no_quotes" {
1279}1271}
12801272
1281test "n_string_backslash_00" {1273test "n_string_backslash_00" {
1282 err(1274 err("[\"\x00\"]");
1283 \\["\"]
1284 );
1285}1275}
12861276
1287test "n_string_escaped_backslash_bad" {1277test "n_string_escaped_backslash_bad" {
...@@ -1291,9 +1281,7 @@ test "n_string_escaped_backslash_bad" {...@@ -1291,9 +1281,7 @@ test "n_string_escaped_backslash_bad" {
1291}1281}
12921282
1293test "n_string_escaped_ctrl_char_tab" {1283test "n_string_escaped_ctrl_char_tab" {
1294 err(1284 err("\x5b\x22\x5c\x09\x22\x5d");
1295 \\["\ "]
1296 );
1297}1285}
12981286
1299test "n_string_escaped_emoji" {1287test "n_string_escaped_emoji" {
...@@ -1416,9 +1404,7 @@ test "n_string_with_trailing_garbage" {...@@ -1416,9 +1404,7 @@ test "n_string_with_trailing_garbage" {
1416}1404}
14171405
1418test "n_structure_100000_opening_arrays" {1406test "n_structure_100000_opening_arrays" {
1419 err(1407 err("[" ** 100000);
1420 "[" ** 100000
1421 );
1422}1408}
14231409
1424test "n_structure_angle_bracket_." {1410test "n_structure_angle_bracket_." {
...@@ -1558,9 +1544,7 @@ test "n_structure_open_array_comma" {...@@ -1558,9 +1544,7 @@ test "n_structure_open_array_comma" {
1558}1544}
15591545
1560test "n_structure_open_array_object" {1546test "n_structure_open_array_object" {
1561 err(1547 err("[{\"\":" ** 50000);
1562 "[{\"\":" ** 50000
1563 );
1564}1548}
15651549
1566test "n_structure_open_array_open_object" {1550test "n_structure_open_array_open_object" {
...@@ -1900,9 +1884,7 @@ test "i_string_UTF8_surrogate_U+D800" {...@@ -1900,9 +1884,7 @@ test "i_string_UTF8_surrogate_U+D800" {
1900}1884}
19011885
1902test "i_structure_500_nested_arrays" {1886test "i_structure_500_nested_arrays" {
1903 any(1887 any(("[" ** 500) ++ ("]" ** 500));
1904 ("[" ** 500) ++ ("]" ** 500)
1905 );
1906}1888}
19071889
1908test "i_structure_UTF-8_BOM_empty_object" {1890test "i_structure_UTF-8_BOM_empty_object" {