Skip to content

Commit ee9ec6c

Browse files
authored
Merge pull request #620 from IntersectMBO/dcoutts/quicker-test-shrink-compact-Chunks
Faster shrinker test for Compat's Chunks generator
2 parents 7a5848b + 42a1dbc commit ee9ec6c

File tree

1 file changed

+5
-6
lines changed
  • test/Test/Database/LSMTree/Internal/Index

1 file changed

+5
-6
lines changed

test/Test/Database/LSMTree/Internal/Index/Compact.hs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ import Test.QuickCheck
4444
import Test.Tasty (TestTree, testGroup)
4545
import Test.Tasty.HUnit (assertEqual, testCase)
4646
import Test.Tasty.QuickCheck (testProperty)
47+
import Test.Util.Arbitrary (noTags,
48+
prop_arbitraryAndShrinkPreserveInvariant)
4749
import Test.Util.Orphans ()
4850
import Text.Printf (printf)
4951

@@ -58,12 +60,9 @@ tests = testGroup "Test.Database.LSMTree.Internal.Index.Compact" [
5860
, testProperty "prop_singlesEquivMulti" $
5961
prop_singlesEquivMulti @BiasedKeyForIndexCompact
6062
, testGroup "(De)serialisation" [
61-
testGroup "test Chunks generator" [
62-
testProperty "Arbitrary satisfies invariant" $
63-
property . chunksInvariant
64-
, testProperty "Shrinking satisfies invariant" $
65-
property . all chunksInvariant . shrink @Chunks
66-
]
63+
testGroup "Chunks generator" $
64+
prop_arbitraryAndShrinkPreserveInvariant noTags chunksInvariant
65+
6766
, testCase "index-2-clash" $ do
6867
let k1 = SerialisedKey' (VP.replicate 16 0x00)
6968
let k2 = SerialisedKey' (VP.replicate 16 0x11)

0 commit comments

Comments
 (0)