Verifies: SYS-REQ-008 [boundary] Code MC/DC gap: parser.go:497 EachKey i < ln Normal EachKey iteration has i < ln TRUE.
(t *testing.T)
| 756 | // Code MC/DC gap: parser.go:497 EachKey i < ln |
| 757 | // Normal EachKey iteration has i < ln TRUE. |
| 758 | func TestCodeMCDC_EachKeyLoopBound(t *testing.T) { |
| 759 | var count int |
| 760 | EachKey([]byte(`{"a":1,"b":2}`), func(idx int, value []byte, vt ValueType, err error) { |
| 761 | count++ |
| 762 | }, []string{"a"}, []string{"b"}) |
| 763 | if count != 2 { |
| 764 | t.Fatalf("EachKey loop count = %d, want 2", count) |
| 765 | } |
| 766 | } |
| 767 | |
| 768 | // ============================================================================= |
| 769 | // Code MC/DC gap closure tests — round 2 (100% target) |