aboutsummaryrefslogtreecommitdiff
path: root/lib/std/json/scanner_test.zig
AgeCommit message (Collapse)Author
2025-09-20std.json: delete test tightly coupled to ArrayList growthAndrew Kelley
This test works by assuming that std.ArrayList will grow with a specific capacity increasing pattern, which is an invalid assumption. Delete the offending test.
2025-09-18add some new fuzz testsKendall Condon
2025-07-19std.json: update to new I/O APIAndrew Kelley
also do a little bit of namespace cleanup
2025-02-13std.ArrayList: initial capacity based on cache line sizeAndrew Kelley
also std.MultiArrayList
2024-08-07fix tests actually checking string contentsJosh Wolfe
2024-02-26Remove redundant test name prefixes now that test names are fully qualifiedRyan Liptak
Follow up to #19079, which made test names fully qualified. This fixes tests that now-redundant information in their test names. For example here's a fully qualified test name before the changes in this commit: "priority_queue.test.std.PriorityQueue: shrinkAndFree" and the same test's name after the changes in this commit: "priority_queue.test.shrinkAndFree"
2024-01-09AstGen: add error for redundant comptime var in comptime scope (#18242)Bogdan Romanyuk
2023-10-27std.json: Parse -0 as a float instead of an integer (#17729)Linus Groh
This is consistent with `JSON.parse("-0")` in JavaScript, RFC 8259 doesn't specifically mention what to do in this case. If a negative zero is encoded the intention is likely to preserve the sign.
2023-09-06std: enable FailingAllocator to fail on resizeGregory Anders
Now that allocator.resize() is allowed to fail, programs may wish to test code paths that handle resize() failure. The simplest way to do this now is to replace the vtable of the testing allocator with one that uses Allocator.noResize for the 'resize' function pointer. An alternative way to support this testing capability is to augment the FailingAllocator (which is already useful for testing allocation failure scenarios) to intentionally fail on calls to resize(). To do this, add a 'resize_fail_index' parameter to the FailingAllocator that causes resize() to fail after the given number of calls.
2023-08-15std.json: Fix decoding of UTF-16 surrogate pairs (#16830)Ryan Liptak
* std.unicode: Add more UTF-16 decoding functions This mostly makes parts of Utf16LeIterator reusable * std.json: Fix decoding of UTF-16 surrogate pairs Before this commit, there were 524,288 codepoints that would get decoded improperly. After this commit, there are 0. Fixes #16828
2023-05-13std: Rewrite low-level json api to support streaming (#15602)Josh Wolfe