assertAfterStep runs the post-step invariants: no panic (caught above), json.Valid (when input was valid + shape matches), and the per-step sequence assertion (passed in as `check`).
(t *testing.T, label string, state []byte, path []string, check func(t *testing.T, state []byte))
| 514 | // json.Valid (when input was valid + shape matches), and the per-step |
| 515 | // sequence assertion (passed in as `check`). |
| 516 | func assertAfterStep(t *testing.T, label string, state []byte, path []string, check func(t *testing.T, state []byte)) { |
| 517 | t.Helper() |
| 518 | if len(state) == 0 { |
| 519 | return |
| 520 | } |
| 521 | if !json.Valid(state) { |
| 522 | t.Errorf("%s produced invalid JSON (OUTPUT-VALIDITY violation): state=%q path=%v", |
| 523 | label, state, path) |
| 524 | return |
| 525 | } |
| 526 | if check != nil { |
| 527 | check(t, state) |
| 528 | } |
| 529 | } |
| 530 | |
| 531 | // FuzzSequence runs multi-operation sequences against a single JSON document. |
| 532 | // |