File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -335,6 +335,7 @@ semigroupProperties = testGroup "Properties of a Semigroup"
335
335
[ localOption (QuickCheckTests 10000 )
336
336
$ testProperty " (<>) is associative" operationAssocativity
337
337
, testProperty " sconcat === foldr1 (<>)" foldableApplication
338
+ , testProperty " stimes n === mconcat . replicate n" repeatedApplication
338
339
]
339
340
where
340
341
operationAssocativity :: BitVector -> BitVector -> BitVector -> Property
@@ -349,6 +350,10 @@ semigroupProperties = testGroup "Properties of a Semigroup"
349
350
bvs = let x: xs = getNonEmpty nel
350
351
in x:| xs
351
352
353
+ repeatedApplication :: (NonNegative Int ) -> BitVector -> Property
354
+ repeatedApplication (NonNegative i) bv =
355
+ stimes i bv === (mconcat . replicate i) bv
356
+
352
357
353
358
bitVectorProperties :: TestTree
354
359
bitVectorProperties = testGroup " BitVector properties"
You can’t perform that action at this time.
0 commit comments