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

Function TestGetUnsafeStringMalformedInput

deep_spec_test.go:803–808  ·  view source on GitHub ↗

============================================================================= GetUnsafeString edge cases (SYS-REQ-080, SYS-REQ-081, SYS-REQ-082) ============================================================================= Verifies: SYS-REQ-080 [malformed] GetUnsafeString on malformed input shall pr

(t *testing.T)

Source from the content-addressed store, hash-verified

801// Verifies: SYS-REQ-080 [malformed]
802// GetUnsafeString on malformed input shall propagate Get error.
803func TestGetUnsafeStringMalformedInput(t *testing.T) {
804 _, err := GetUnsafeString([]byte(`{"a"::`), "a")
805 if err == nil {
806 t.Fatal("GetUnsafeString on malformed input should return error")
807 }
808}
809
810// Verifies: SYS-REQ-081 [boundary]
811// GetUnsafeString on empty input shall return error.

Callers

nothing calls this directly

Calls 1

GetUnsafeStringFunction · 0.85

Tested by

no test coverage detected