also formatting

This commit is contained in:
Rowan Torbitzky-Lane 2025-02-01 00:18:33 -06:00
parent 32b48b79d0
commit 24442169bf
2 changed files with 63 additions and 44 deletions

View File

@ -1,8 +1,26 @@
import Instructions
import State
import Test.QuickCheck
-- import Control.Lens
myArgs =
Args
{ replay = Nothing,
maxSuccess = 100,
maxDiscardRatio = 10,
maxSize = 10,
chatty = True,
maxShrinks = 500
}
-- quickCheckWith myArgs prop_IntAdd
-- Running this with a large max size leads quickCheck to hang, and that's bad
prop_IntAdd :: State -> Bool
prop_IntAdd state@(State {_int = i1 : i2 : is}) = i1 + i2 == head (_int (instructionIntAdd state))
prop_IntAdd state = state == instructionIntAdd state
main :: IO ()
main = do
putStrLn "hello"

View File

@ -2,6 +2,7 @@ import Control.Exception (assert)
import Instructions
import Push
import State
-- import Debug.Trace
-- TODO: Need a function that can compare states.