aboutsummaryrefslogtreecommitdiff
path: root/lib/std/json/stringify_test.zig
diff options
context:
space:
mode:
authorTechatrix <19954306+Techatrix@users.noreply.github.com>2023-07-04 21:10:39 +0200
committerAndrew Kelley <andrew@ziglang.org>2023-07-10 10:50:57 -0700
commit3bf0b8eada9ec97d4413fed5be29f5e2af30dce1 (patch)
treeabb28345bbfebf4e87a77156b94bb2426da8533d /lib/std/json/stringify_test.zig
parent2b8c1f0d4619565255b9faff2d24bc2360012552 (diff)
downloadzig-3bf0b8eada9ec97d4413fed5be29f5e2af30dce1.tar.gz
zig-3bf0b8eada9ec97d4413fed5be29f5e2af30dce1.zip
explicitly specify error set of `std.json.stringify`
Diffstat (limited to 'lib/std/json/stringify_test.zig')
-rw-r--r--lib/std/json/stringify_test.zig17
1 files changed, 0 insertions, 17 deletions
diff --git a/lib/std/json/stringify_test.zig b/lib/std/json/stringify_test.zig
index 7fff97f13e..19f8f06e5e 100644
--- a/lib/std/json/stringify_test.zig
+++ b/lib/std/json/stringify_test.zig
@@ -260,23 +260,6 @@ fn teststringify(expected: []const u8, value: anytype, options: StringifyOptions
if (vos.expected_remaining.len > 0) return error.NotEnoughData;
}
-test "stringify struct with custom stringify that returns a custom error" {
- var ret = stringify(struct {
- field: Field = .{},
-
- pub const Field = struct {
- field: ?[]*Field = null,
-
- const Self = @This();
- pub fn jsonStringify(_: Self, _: StringifyOptions, _: anytype) error{CustomError}!void {
- return error.CustomError;
- }
- };
- }{}, StringifyOptions{}, std.io.null_writer);
-
- try std.testing.expectError(error.CustomError, ret);
-}
-
test "stringify alloc" {
const allocator = std.testing.allocator;
const expected =