Coding & developmentParsingcode
Test a parser against malformed inputs
Makes failure behaviour explicit before implementation.

Ready to use
Prompt
Inputs: [PARSER CONTRACT], [INPUT EXAMPLES], [LANGUAGE]. Enumerate empty, truncated, repeated, wrong-encoding and oversized cases. Specify expected error type and safe handling without silently correcting ambiguous data. Output: A test matrix and minimal test code limited to the supplied contract. Check: No case causes partial output to masquerade as valid. If essential information is missing, identify it rather than filling the gap with a guess. Include a case where partial data looks plausible despite the parser reporting an error.