ibhelper/test/UtilSpec.hs
2022-03-14 20:12:24 +01:00

15 lines
341 B
Haskell

{-# LANGUAGE NoImplicitPrelude #-}
module UtilSpec (spec) where
import Import
import Util
import Test.Hspec
import Test.Hspec.QuickCheck
spec :: Spec
spec = do
describe "plus2" $ do
it "basic check" $ plus2 0 `shouldBe` 2
it "overflow" $ plus2 maxBound `shouldBe` minBound + 1
prop "minus 2" $ \i -> plus2 i - 2 `shouldBe` i