| ... | ... | @@ -260,23 +260,6 @@ fn teststringify(expected: []const u8, value: anytype, options: StringifyOptions |
| 260 | 260 | if (vos.expected_remaining.len > 0) return error.NotEnoughData; |
| 261 | 261 | } |
| 262 | 262 | |
| 263 | | test "stringify struct with custom stringify that returns a custom error" { |
| 264 | | var ret = stringify(struct { |
| 265 | | field: Field = .{}, |
| 266 | | |
| 267 | | pub const Field = struct { |
| 268 | | field: ?[]*Field = null, |
| 269 | | |
| 270 | | const Self = @This(); |
| 271 | | pub fn jsonStringify(_: Self, _: StringifyOptions, _: anytype) error{CustomError}!void { |
| 272 | | return error.CustomError; |
| 273 | | } |
| 274 | | }; |
| 275 | | }{}, StringifyOptions{}, std.io.null_writer); |
| 276 | | |
| 277 | | try std.testing.expectError(error.CustomError, ret); |
| 278 | | } |
| 279 | | |
| 280 | 263 | test "stringify alloc" { |
| 281 | 264 | const allocator = std.testing.allocator; |
| 282 | 265 | const expected = |