Close the coverage gap from attempt 1: example 0713 now builds integer fields holding s64 MIN (-9223372036854775808) and s64 MAX (9223372036854775807) — plus zero, a small negative, and a small positive — and asserts the EXACT emitted bytes. This permanently pins the edge that write_int is specifically engineered for (folding positives into negative space so MIN's non-representable-positive magnitude serializes correctly). s64 MIN is expressed as (0 - 9223372036854775807 - 1) because its magnitude is not a representable positive s64 literal. Test hygiene: stream to a repo-local, gitignored .sx-tmp/ path (created if missing) instead of a fixed /tmp name, and unlink it right after read-back so nothing leaks. Writer/model logic and src/ are untouched.
6 lines
262 B
Plaintext
6 lines
262 B
Plaintext
doc: {"name":"a\"b\n","tab":"x\ty","bs":"c\\d","ctrl":"\u0001","n":-7,"zero":0,"pos":7,"min":-9223372036854775808,"max":9223372036854775807,"ok":true,"nil":null,"xs":[1,-2,3],"nested":{"k":"v"}}
|
|
buffer-exact: ok
|
|
buffer-len: ok
|
|
overflow-raised: ok
|
|
file-exact: ok
|