Verifies: SYS-REQ-035 [boundary] Code MC/DC gap: parser.go:800 Delete data[endOffset+tokEnd] == ']' Drive data[endOffset+tokEnd] == ']' to FALSE in the array-element deletion branch. This happens when deleting the first element of an array where the next delimiter is a comma, not ']'.
(t *testing.T)
| 675 | // deletion branch. This happens when deleting the first element of an array |
| 676 | // where the next delimiter is a comma, not ']'. |
| 677 | func TestCodeMCDC_DeleteArrayFirstElement(t *testing.T) { |
| 678 | // Delete [0] from [1,2,3] -- the delimiter after "1" is ',' not ']' |
| 679 | got := string(Delete([]byte(`[1,2,3]`), "[0]")) |
| 680 | if got != `[2,3]` { |
| 681 | t.Fatalf("Delete array first element = %q, want %q", got, `[2,3]`) |
| 682 | } |
| 683 | |
| 684 | // Delete [1] from [1,2,3] -- the delimiter after "2" is ',' not ']' |
| 685 | got2 := string(Delete([]byte(`[1,2,3]`), "[1]")) |
| 686 | if got2 != `[1,3]` { |
| 687 | t.Fatalf("Delete array middle element = %q, want %q", got2, `[1,3]`) |
| 688 | } |
| 689 | } |
| 690 | |
| 691 | // Verifies: SYS-REQ-014 [boundary] |
| 692 | // Code MC/DC gap: escape.go:149 Unescape for len(in) > 0 |
nothing calls this directly
no test coverage detected
searching dependent graphs…