MCPcopy Create free account
hub / github.com/buger/jsonparser / TestGetStringMalformedInput

Function TestGetStringMalformedInput

deep_spec_test.go:672–677  ·  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

670// Verifies: SYS-REQ-071 [malformed]
671// GetString on malformed input shall propagate Get error.
672func TestGetStringMalformedInput(t *testing.T) {
673 _, err := GetString([]byte(`{"a"::`), "a")
674 if err == nil {
675 t.Fatal("GetString on malformed input should return error")
676 }
677}
678
679// Verifies: SYS-REQ-072 [malformed]
680// 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