Verifies: SYS-REQ-008 [boundary]
(t *testing.T)
| 618 | |
| 619 | // Verifies: SYS-REQ-008 [boundary] |
| 620 | func TestStress_EachKey_LargeNestedSkip(t *testing.T) { |
| 621 | // Build a large nested object that must be skipped |
| 622 | inner := `{"a":{"b":{"c":{"d":"deep"}}}}` |
| 623 | data := fmt.Sprintf(`{"skip":%s,"want":"found"}`, inner) |
| 624 | paths := [][]string{{"want"}} |
| 625 | |
| 626 | var found bool |
| 627 | EachKey([]byte(data), func(idx int, value []byte, vt ValueType, err error) { |
| 628 | if idx == 0 { |
| 629 | found = true |
| 630 | if string(value) != "found" { |
| 631 | t.Fatalf("expected 'found', got %q", value) |
| 632 | } |
| 633 | } |
| 634 | }, paths...) |
| 635 | |
| 636 | if !found { |
| 637 | t.Fatal("EachKey failed to find 'want' after large nested skip") |
| 638 | } |
| 639 | } |
| 640 | |
| 641 | // Verifies: SYS-REQ-010 [boundary] |
| 642 | func TestStress_Delete_TokenEndBoundary(t *testing.T) { |