MCPcopy Index your code
hub / github.com/buger/jsonparser / TestGetUnsafeStringMalformedInput

Function TestGetUnsafeStringMalformedInput

deep_spec_test.go:789–794  ·  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

787// Verifies: SYS-REQ-080 [malformed]
788// GetUnsafeString on malformed input shall propagate Get error.
789func TestGetUnsafeStringMalformedInput(t *testing.T) {
790 _, err := GetUnsafeString([]byte(`{"a"::`), "a")
791 if err == nil {
792 t.Fatal("GetUnsafeString on malformed input should return error")
793 }
794}
795
796// Verifies: SYS-REQ-081 [boundary]
797// GetUnsafeString on empty input shall return error.

Callers

nothing calls this directly

Calls 1

GetUnsafeStringFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…