Skip to content

Commit 5c7465b

Browse files
authored
Merge pull request #596 from IntersectMBO/dcoutts/shrink-mupserts
In the state machine tests, shrink mupserts and table unions
2 parents f56fc79 + f53e4f6 commit 5c7465b

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

test/Test/Database/LSMTree/StateMachine.hs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1688,6 +1688,19 @@ shrinkActionWithVars _ctx _st = \case
16881688
| let f k = (k, R.Delete)
16891689
]
16901690

1691+
Mupserts kvs tableVar -> [
1692+
Some $ Mupserts kvs' tableVar
1693+
| kvs' <- QC.shrink kvs
1694+
] <> [
1695+
Some $ Updates (V.map f kvs) tableVar
1696+
| let f (k, v) = (k, R.Mupsert v)
1697+
]
1698+
1699+
Unions tableVars -> [
1700+
Some $ Unions tableVars'
1701+
| tableVars' <- QC.liftShrink (const []) tableVars
1702+
]
1703+
16911704
Lookups ks tableVar -> [ Some $ Lookups ks' tableVar | ks' <- QC.shrink ks ]
16921705

16931706
-- Snapshots

0 commit comments

Comments
 (0)