test(json): add invalid input test to test_json.lua #14

Closed
opened 2026-04-24 10:52:00 +02:00 by michael · 1 comment
Owner

test_json.lua only tests happy path. Add a test for json.decode with invalid input to ensure error behavior is covered for all backends (cjson, dkjson, pure-lua). Prevents regression of DAW/daw-lua-common#.

test_json.lua only tests happy path. Add a test for json.decode with invalid input to ensure error behavior is covered for all backends (cjson, dkjson, pure-lua). Prevents regression of DAW/daw-lua-common#<fix-issue>.
Author
Owner

Added: decode error handling (malformed object, unterminated string, truncated array) and encode error handling (unsupported type) to test_json.lua. Verified against the pure-lua backend; cjson/dkjson branches share the same pcall-wrapped code path verified separately during the #25 fix.

Added: decode error handling (malformed object, unterminated string, truncated array) and encode error handling (unsupported type) to test_json.lua. Verified against the pure-lua backend; cjson/dkjson branches share the same pcall-wrapped code path verified separately during the #25 fix.
michael 2026-07-19 17:55:57 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
DAW/daw-lua-common#14
No description provided.