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

Function TestInvalidSurrogateLow

deep_spec_test.go:635–641  ·  view source on GitHub ↗

Verifies: SYS-REQ-062 [malformed] High surrogate followed by invalid low surrogate shall return MalformedValueError.

(t *testing.T)

Source from the content-addressed store, hash-verified

633// Verifies: SYS-REQ-062 [malformed]
634// High surrogate followed by invalid low surrogate shall return MalformedValueError.
635func TestInvalidSurrogateLow(t *testing.T) {
636 // \uD800\u0041 - valid unicode escape but not in low surrogate range
637 _, err := ParseString([]byte(`\uD800\u0041`))
638 if !errors.Is(err, MalformedValueError) {
639 t.Fatalf("ParseString(invalid low surrogate) error = %v, want %v", err, MalformedValueError)
640 }
641}
642
643// Verifies: SYS-REQ-063 [malformed]
644// Backslash at end of string shall return MalformedValueError.

Callers

nothing calls this directly

Calls 1

ParseStringFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…