Skip to content

Commit 6bce763

Browse files
author
Varun Deep Saini
committed
MDEV-18318 Unit tests for the Json_writer
Add 100 TAP unit tests for the Json_writer class covering: - Invalid JSON detection (unnamed values in objects, named values in arrays, mismatched open/close, duplicate keys) - Output verification for all value types (strings, integers, unsigned integers, booleans, null, doubles, sizes) - Edge cases: LLONG_MAX/MIN, ULLONG_MAX, special doubles (0.0, -0.0, HUGE_VAL, NAN), UTF-8 strings, special characters in keys and values - Single-line formatting helper for short arrays - Nested structures (objects in objects, arrays of objects, mixed) - RAII wrappers (Json_writer_object, Json_writer_array) including NULL writer "ignore mode" - String_with_limit truncation behavior - Json_writer size limit enforcement - add_size formatting (bytes, Kb, Mb) Signed-off-by: Varun Deep Saini <varun.23bcs10048@ms.sst.scaler.com>
1 parent 8e3c93b commit 6bce763

1 file changed

Lines changed: 849 additions & 2 deletions

File tree

0 commit comments

Comments
 (0)