MCPcopy
hub / github.com/buger/jsonparser / TestGetStringMalformedInput

Function TestGetStringMalformedInput

deep_spec_test.go:658–663  ·  view source on GitHub ↗

============================================================================= GetString edge cases (SYS-REQ-071, SYS-REQ-072, SYS-REQ-073, SYS-REQ-074) ============================================================================= Verifies: SYS-REQ-071 [malformed] GetString on malformed input shall p

(t *testing.T)

Source from the content-addressed store, hash-verified

656// Verifies: SYS-REQ-071 [malformed]
657// GetString on malformed input shall propagate Get error.
658func TestGetStringMalformedInput(t *testing.T) {
659 _, err := GetString([]byte(`{"a"::`), "a")
660 if err == nil {
661 t.Fatal("GetString on malformed input should return error")
662 }
663}
664
665// Verifies: SYS-REQ-072 [malformed]
666// GetString with truncated escape in value shall return error.

Callers

nothing calls this directly

Calls 1

GetStringFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…