Verifies: SYS-REQ-010 [boundary]
(t *testing.T)
| 640 | |
| 641 | // Verifies: SYS-REQ-010 [boundary] |
| 642 | func TestStress_Delete_TokenEndBoundary(t *testing.T) { |
| 643 | // Test Delete where tokenEnd reaches the sentinel (returns len(data)) |
| 644 | // This exercises the new `endOffset+tokEnd >= len(data)` guard |
| 645 | result := Delete([]byte(`{"a":1,"b":2}`), "b") |
| 646 | val, _, _, err := Get(result, "a") |
| 647 | if err != nil { |
| 648 | t.Fatalf("after delete, failed to get 'a': %v", err) |
| 649 | } |
| 650 | if string(val) != "1" { |
| 651 | t.Fatalf("after delete, 'a' = %q, want '1'", val) |
| 652 | } |
| 653 | } |
| 654 | |
| 655 | // Verifies: SYS-REQ-001 [boundary] |
| 656 | func TestStress_Get_BareTruncatedValue(t *testing.T) { |