std.json: josh review fixes
* renamed enum_big_numbers_quoted option to enum_nonportable_numbers_as_strings * updated stringify doc to mention the option I also reversed the logic to determine whether an integer is nonportable, it seemed easier to reason about. I also took a stab at applying the new option to floats, but, I got stuck at trying to print large floats, not sure if Zig supports that yet.
This commit is contained in:
@@ -434,7 +434,7 @@ test "print" {
|
||||
try std.testing.expectEqualStrings(expected, result);
|
||||
}
|
||||
|
||||
test "big integers" {
|
||||
test "nonportable numbers" {
|
||||
try testStringify("9999999999999999", 9999999999999999, .{});
|
||||
try testStringify("\"9999999999999999\"", 9999999999999999, .{ .emit_big_numbers_quoted = true });
|
||||
try testStringify("\"9999999999999999\"", 9999999999999999, .{ .emit_nonportable_numbers_as_strings = true });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user