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

Function TestDecodeSingleUnicodeEscape

escape_test.go:71–84  ·  view source on GitHub ↗

Verifies: SYS-REQ-014 [malformed] MCDC SYS-REQ-014: N/A

(t *testing.T)

Source from the content-addressed store, hash-verified

69// Verifies: SYS-REQ-014 [malformed]
70// MCDC SYS-REQ-014: N/A
71func TestDecodeSingleUnicodeEscape(t *testing.T) {
72 for _, test := range singleUnicodeEscapeTests {
73 r, ok := decodeSingleUnicodeEscape([]byte(test.in))
74 isErr := !ok
75
76 if isErr != test.isErr {
77 t.Errorf("decodeSingleUnicodeEscape(%s) returned isErr mismatch: expected %t, obtained %t", test.in, test.isErr, isErr)
78 } else if isErr {
79 continue
80 } else if r != test.out {
81 t.Errorf("decodeSingleUnicodeEscape(%s) returned rune mismatch: expected %x (%c), obtained %x (%c)", test.in, test.out, test.out, r, r)
82 }
83 }
84}
85
86// Verifies: SYS-REQ-014 [malformed]
87// MCDC SYS-REQ-014: N/A

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…