diff options
| author | Jakub Konka <kubkon@jakubkonka.com> | 2023-10-25 23:25:56 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-10-25 23:25:56 +0200 |
| commit | cc394431ae6eb69e7abd677c268a8ab7299f8aeb (patch) | |
| tree | d5aa705cdc7d701b53f32a8c2acc099c2dbd90c5 /lib/std/json/static_test.zig | |
| parent | 10ea7accf76d4ad59222ea5ff3585d6cc7cfe3b0 (diff) | |
| parent | ed00afbc4c1eec6d599ac277e364b4a1ed11fe5c (diff) | |
| download | zig-cc394431ae6eb69e7abd677c268a8ab7299f8aeb.tar.gz zig-cc394431ae6eb69e7abd677c268a8ab7299f8aeb.zip | |
Merge pull request #17699 from ziglang/elf-better-alloc
elf: allocated PHDR table always immediately succeeding the EHDR
Diffstat (limited to 'lib/std/json/static_test.zig')
| -rw-r--r-- | lib/std/json/static_test.zig | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/lib/std/json/static_test.zig b/lib/std/json/static_test.zig index 892ec85a50..e447000674 100644 --- a/lib/std/json/static_test.zig +++ b/lib/std/json/static_test.zig @@ -372,8 +372,6 @@ test "test all types" { } test "parse" { - if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; - try testing.expectEqual(false, try parseFromSliceLeaky(bool, testing.allocator, "false", .{})); try testing.expectEqual(true, try parseFromSliceLeaky(bool, testing.allocator, "true", .{})); try testing.expectEqual(@as(u1, 1), try parseFromSliceLeaky(u1, testing.allocator, "1", .{})); @@ -405,8 +403,6 @@ test "parse into enum" { } test "parse into that allocates a slice" { - if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; - { // string as string const parsed = try parseFromSlice([]u8, testing.allocator, "\"foo\"", .{}); @@ -427,16 +423,12 @@ test "parse into that allocates a slice" { } test "parse into sentinel slice" { - if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; - const parsed = try parseFromSlice([:0]const u8, testing.allocator, "\"\\n\"", .{}); defer parsed.deinit(); try testing.expect(std.mem.eql(u8, parsed.value, "\n")); } test "parse into tagged union" { - if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; - const T = union(enum) { nothing, int: i32, @@ -452,8 +444,6 @@ test "parse into tagged union" { } test "parse into tagged union errors" { - if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; - const T = union(enum) { nothing, int: i32, @@ -485,8 +475,6 @@ test "parse into struct with no fields" { const test_const_value: usize = 123; test "parse into struct with default const pointer field" { - if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; - const T = struct { a: *const usize = &test_const_value }; const parsed = try parseFromSlice(T, testing.allocator, "{}", .{}); defer parsed.deinit(); @@ -502,8 +490,6 @@ const test_default_str_slice: [2][]const u8 = [_][]const u8{ }; test "freeing parsed structs with pointers to default values" { - if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; - const T = struct { int: *const usize = &test_default_usize, int_ptr: *allowzero align(1) const usize = test_default_usize_ptr, @@ -517,15 +503,11 @@ test "freeing parsed structs with pointers to default values" { } test "parse into struct where destination and source lengths mismatch" { - if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; - const T = struct { a: [2]u8 }; try testing.expectError(error.LengthMismatch, parseFromSlice(T, testing.allocator, "{\"a\": \"bbb\"}", .{})); } test "parse into struct with misc fields" { - if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; - const T = struct { int: i64, float: f64, @@ -601,8 +583,6 @@ test "parse into struct with misc fields" { } test "parse into struct with strings and arrays with sentinels" { - if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; - const T = struct { language: [:0]const u8, language_without_sentinel: []const u8, @@ -631,8 +611,6 @@ test "parse into struct with strings and arrays with sentinels" { } test "parse into struct with duplicate field" { - if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; - const options_first = ParseOptions{ .duplicate_field_behavior = .use_first }; const options_last = ParseOptions{ .duplicate_field_behavior = .use_last }; @@ -652,8 +630,6 @@ test "parse into struct with duplicate field" { } test "parse into struct ignoring unknown fields" { - if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; - const T = struct { int: i64, language: []const u8, @@ -692,8 +668,6 @@ test "parse into struct ignoring unknown fields" { } test "parse into tuple" { - if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; - const Union = union(enum) { char: u8, float: f64, @@ -749,8 +723,6 @@ const ParseIntoRecursiveUnionDefinitionValue = union(enum) { }; test "parse into recursive union definition" { - if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; - const T = struct { values: ParseIntoRecursiveUnionDefinitionValue, }; @@ -772,8 +744,6 @@ const ParseIntoDoubleRecursiveUnionValueSecond = union(enum) { }; test "parse into double recursive union definition" { - if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; - const T = struct { values: ParseIntoDoubleRecursiveUnionValueFirst, }; @@ -785,8 +755,6 @@ test "parse into double recursive union definition" { } test "parse exponential into int" { - if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; - const T = struct { int: i64 }; const r = try parseFromSliceLeaky(T, testing.allocator, "{ \"int\": 4.2e2 }", .{}); try testing.expectEqual(@as(i64, 420), r.int); @@ -795,8 +763,6 @@ test "parse exponential into int" { } test "parseFromTokenSource" { - if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; - { var scanner = JsonScanner.initCompleteInput(testing.allocator, "123"); defer scanner.deinit(); @@ -816,8 +782,6 @@ test "parseFromTokenSource" { } test "max_value_len" { - if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; - try testing.expectError(error.ValueTooLong, parseFromSlice([]u8, testing.allocator, "\"0123456789\"", .{ .max_value_len = 5 })); } @@ -856,8 +820,6 @@ fn assertKey( } } test "json parse partial" { - if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; - const Inner = struct { num: u32, yes: bool, @@ -913,8 +875,6 @@ test "json parse partial" { } test "json parse allocate when streaming" { - if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; - const T = struct { not_const: []u8, is_const: []const u8, |
