File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed
test/Test/Database/LSMTree/Internal/Snapshot Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -294,7 +294,12 @@ arbitraryShortVector = do
294294 n <- chooseInt (0 , 5 )
295295 V. fromList <$> vector n
296296
297- deriving newtype instance Arbitrary RunNumber
297+ instance Arbitrary RunNumber where
298+ arbitrary = RunNumber <$> arbitrarySizedNatural
299+ shrink (RunNumber n) =
300+ -- fewer shrinks
301+ [RunNumber 0 | n > 0 ]
302+ ++ [RunNumber (n `div` 2 ) | n >= 2 ]
298303
299304instance Arbitrary r => Arbitrary (SnapIncomingRun r ) where
300305 arbitrary = oneof [
@@ -343,13 +348,11 @@ instance Arbitrary RunParams where
343348
344349instance Arbitrary RunDataCaching where
345350 arbitrary = elements [CacheRunData , NoCacheRunData ]
346- shrink NoCacheRunData = [CacheRunData ]
347- shrink _ = []
351+ shrink _ = []
348352
349353instance Arbitrary IndexType where
350354 arbitrary = elements [Ordinary , Compact ]
351- shrink Compact = [Ordinary ]
352- shrink _ = []
355+ shrink _ = []
353356
354357instance Arbitrary RunBloomFilterAlloc where
355358 arbitrary = oneof [
You can’t perform that action at this time.
0 commit comments