Verifies: SYS-REQ-014 [malformed] MCDC SYS-REQ-014: N/A
(t *testing.T)
| 69 | // Verifies: SYS-REQ-014 [malformed] |
| 70 | // MCDC SYS-REQ-014: N/A |
| 71 | func 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 |
nothing calls this directly
no test coverage detected
searching dependent graphs…