Created
June 14, 2016 23:17
-
-
Save dmp1ce/d47addab578387ac473acf47b2ca2be6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module LibSpec where | |
import Test.Hspec | |
import Test.Hspec.QuickCheck | |
import Lib (ourAdd,fun1,fun2,fun1',fun2') | |
main :: IO () | |
main = hspec spec | |
spec :: Spec | |
spec = | |
describe "Lib" $ do | |
it "works" $ do | |
True `shouldBe` True | |
prop "ourAdd is commutative" $ \x y -> | |
ourAdd x y `shouldBe` ourAdd y x | |
describe "Exercise 1" $ do | |
prop "fun1 is the same as fun1'" $ \xs -> | |
fun1 xs `shouldBe` fun1' xs | |
prop "fun2 is the same as fun2'" $ \x -> | |
fun2 x `shouldBe` fun2' x |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment