diff options
author | Yann Herklotz <git@ymhg.org> | 2019-05-13 15:28:21 +0100 |
---|---|---|
committer | Yann Herklotz <git@ymhg.org> | 2019-05-13 15:28:21 +0100 |
commit | 0e0dd6ee036c333cd3026917e696cf37996af341 (patch) | |
tree | 3b6e3570f72a5c111db8f8f6ce3430a9cf4de1f3 /src/VeriFuzz.hs | |
parent | f984a79a85b4cc5a077fbf0f7ae6ac52a51822e8 (diff) | |
download | verismith-0e0dd6ee036c333cd3026917e696cf37996af341.tar.gz verismith-0e0dd6ee036c333cd3026917e696cf37996af341.zip |
Add NonEmpty to tests
Diffstat (limited to 'src/VeriFuzz.hs')
-rw-r--r-- | src/VeriFuzz.hs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/VeriFuzz.hs b/src/VeriFuzz.hs index 0d749db..054db72 100644 --- a/src/VeriFuzz.hs +++ b/src/VeriFuzz.hs @@ -29,6 +29,7 @@ where import Control.Concurrent import Control.Lens +import Control.Monad.IO.Class (liftIO) import qualified Crypto.Random.DRBG as C import Data.ByteString (ByteString) import Data.ByteString.Builder (byteStringHex, toLazyByteString) @@ -333,7 +334,7 @@ handleOpts (Parse f) = do Left l -> print l Right v -> print $ GenVerilog v where file = T.unpack . toTextIgnore $ f -handleOpts (Reduce f t s) = reduceWithScript t s f +handleOpts (Reduce f t s) = shelly $ reduceWithScript t s f handleOpts (ConfigOpt c conf r) = do config <- if r then getConfig conf >>= randomise else getConfig conf maybe (T.putStrLn . encodeConfig $ config) @@ -458,4 +459,4 @@ runEquivalence seed gm t d k i = do where n = t <> "_" <> T.pack (show i) runReduce :: SourceInfo -> IO SourceInfo -runReduce s = reduce (\s' -> not <$> checkEquivalence s' "reduce") s +runReduce s = shelly $ reduce (\s' -> not <$> liftIO (checkEquivalence s' "reduce")) s |