Verifies: SYS-REQ-014 [malformed] MCDC SYS-REQ-014: N/A
(t *testing.T)
| 74 | // Verifies: SYS-REQ-014 [malformed] |
| 75 | // MCDC SYS-REQ-014: N/A |
| 76 | func TestDecodeSingleUnicodeEscape(t *testing.T) { |
| 77 | for _, test := range singleUnicodeEscapeTests { |
| 78 | r, ok := decodeSingleUnicodeEscape([]byte(test.in)) |
| 79 | isErr := !ok |
| 80 | |
| 81 | if isErr != test.isErr { |
| 82 | t.Errorf("decodeSingleUnicodeEscape(%s) returned isErr mismatch: expected %t, obtained %t", test.in, test.isErr, isErr) |
| 83 | } else if isErr { |
| 84 | continue |
| 85 | } else if r != test.out { |
| 86 | t.Errorf("decodeSingleUnicodeEscape(%s) returned rune mismatch: expected %x (%c), obtained %x (%c)", test.in, test.out, test.out, r, r) |
| 87 | } |
| 88 | } |
| 89 | } |
| 90 | |
| 91 | // Verifies: SYS-REQ-014 [malformed] |
| 92 | // MCDC SYS-REQ-014: N/A |
nothing calls this directly
no test coverage detected