Verifies: SYS-REQ-014 [fuzz] MCDC SYS-REQ-014: N/A
(t *testing.T)
| 385 | // Verifies: SYS-REQ-014 [fuzz] |
| 386 | // MCDC SYS-REQ-014: N/A |
| 387 | func TestFuzzParseStringHarnessCoverage(t *testing.T) { |
| 388 | if got := FuzzParseString([]byte(`abc`)); got != 1 { |
| 389 | t.Fatalf("FuzzParseString success path = %d, want 1", got) |
| 390 | } |
| 391 | if got := FuzzParseString([]byte(``)); got != 0 { |
| 392 | t.Fatalf("FuzzParseString empty string path = %d, want 0", got) |
| 393 | } |
| 394 | // Per DEFECT-260727-SNGT a lone high surrogate now substitutes U+FFFD (no |
| 395 | // error), so \uD800 is no longer malformed. Use a truncated low-surrogate |
| 396 | // escape (\uD800\u) to exercise the genuine malformed-escape path. |
| 397 | if got := FuzzParseString([]byte(`\uD800\u`)); got != 0 { |
| 398 | t.Fatalf("FuzzParseString malformed escape path = %d, want 0", got) |
| 399 | } |
| 400 | } |
| 401 | |
| 402 | // Verifies: STK-REQ-001 [malformed] |
| 403 | // MCDC STK-REQ-001: N/A |
nothing calls this directly
no test coverage detected