Verifies: SYS-REQ-006 [boundary]
(t *testing.T)
| 514 | |
| 515 | // Verifies: SYS-REQ-006 [boundary] |
| 516 | func TestRemoval6_ArrayEach_WhitespaceOnlyInput(t *testing.T) { |
| 517 | // Can Get return (nil, NotExist, 0, nil)? |
| 518 | // Get(" ") → nextToken returns 0 pointing to first space... no. |
| 519 | // nextToken skips spaces. " " → returns -1 → MalformedJsonError. |
| 520 | // So Get returns (nil, NotExist, 0, MalformedJsonError). offset=0, err!=nil. |
| 521 | // In ArrayEach: if o==0, returns offset, e — correct. |
| 522 | _, err := ArrayEach([]byte(`[ `), func(value []byte, dataType ValueType, offset int, err error) { |
| 523 | // should not be called |
| 524 | }) |
| 525 | if err == nil { |
| 526 | t.Fatal("expected error for whitespace-only array content") |
| 527 | } |
| 528 | t.Logf("Correctly got error: %v", err) |
| 529 | } |
| 530 | |
| 531 | // ============================================================================= |
| 532 | // REMOVAL 7: `ln > 0` guard removed in findKeyStart |
nothing calls this directly
no test coverage detected