Skip to content

Commit

Permalink
Remove unnecessary copied code
Browse files Browse the repository at this point in the history
  • Loading branch information
tbidne committed Jun 7, 2024
1 parent ac0a079 commit 7cb005a
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions test/unit/Unit/Shrun/Configuration/Data/CommandLogging/ReadSize.hs
Original file line number Diff line number Diff line change
Expand Up @@ -48,33 +48,13 @@ parseNatSucceeds = testPropertyNamed desc name $ do
annotate $ expectedSuccess txt err
failure
EitherRight _ -> pure ()

allDoubleSizes <- forAll genAllMaxBytesDouble

for_ allDoubleSizes $ \bytes -> do
let txt = bytesToText (MkFloatingFormatter (Just 6)) bytes
case ReadSize.parseReadSize (pure txt) of
EitherLeft err -> do
annotate $ expectedSuccess txt err
failure
EitherRight _ -> pure ()
where
desc = "Integral bytes up to max Int succeedes"
name = "parseNatSucceeds"

parseDoubleSucceeds :: TestTree
parseDoubleSucceeds = testPropertyNamed desc name $ do
property $ do
allNatSizes <- forAll genAllMaxBytes

for_ allNatSizes $ \bytes -> do
let txt = bytesToText MkIntegralFormatter bytes
case ReadSize.parseReadSize (pure txt) of
EitherLeft err -> do
annotate $ expectedSuccess txt err
failure
EitherRight _ -> pure ()

allDoubleSizes <- forAll genAllMaxBytesDouble

for_ allDoubleSizes $ \bytes -> do
Expand Down

0 comments on commit 7cb005a

Please sign in to comment.