[Added tests for fromEnum and toEnum. Nils Anders Danielsson **20050530143249] { hunk ./Test/ChasingBottoms/Nat.hs 95 + -- Add tests for enumFrom and friends if the default definitions are + -- overridden. hunk ./Test/ChasingBottoms/Nat/Tests.hs 63 +prop_Nat_Enum_toEnum (n :: Int) = + n >= 0 ==> (toEnum n :: Nat) == fromInteger (toInteger n) +prop_Nat_Enum_fromEnum (n :: Nat) = + n <= fromInteger (toInteger (maxBound :: Int)) ==> + toInteger (fromEnum n) == toInteger n + +-- enumFrom and friends have default definitions. + hunk ./Test/ChasingBottoms/Nat/Tests.hs 161 + , run prop_Nat_Enum_toEnum + , run prop_Nat_Enum_fromEnum }