Module
Test.QuickCheck.Laws.Data.BoundedEnum
- Package
- purescript-quickcheck-laws
- Repository
- purescript-contrib/purescript-quickcheck-laws
#checkBoundedEnum Source
checkBoundedEnum :: forall a. Arbitrary a => BoundedEnum a => Ord a => Proxy a -> Effect Unit
- succ:
succ bottom >>= succ >>= succ ... succ [cardinality - 1 times] = top
- pred:
pred top >>= pred >>= pred ... pred [cardinality - 1 times] = bottom
- predsucc:
forall a > bottom: pred a >>= succ = Just a
- succpred:
forall a < top: succ a >>= pred = Just a
- enumpred:
forall a > bottom: fromEnum <$> pred a = Just (fromEnum a - 1)
- enumsucc:
forall a < top: fromEnum <$> succ a = Just (fromEnum a + 1)
- compare:
compare e1 e2 = compare (fromEnum e1) (fromEnum e2)
- tofromenum:
toEnum (fromEnum a) = Just a
#checkBoundedEnumGen Source
checkBoundedEnumGen :: forall a. BoundedEnum a => Ord a => Gen a -> Effect Unit
- Modules
- Test.
QuickCheck. Laws - Test.
QuickCheck. Laws. Control - Test.
QuickCheck. Laws. Control. Alt - Test.
QuickCheck. Laws. Control. Alternative - Test.
QuickCheck. Laws. Control. Applicative - Test.
QuickCheck. Laws. Control. Apply - Test.
QuickCheck. Laws. Control. Bind - Test.
QuickCheck. Laws. Control. Category - Test.
QuickCheck. Laws. Control. Comonad - Test.
QuickCheck. Laws. Control. Extend - Test.
QuickCheck. Laws. Control. Monad - Test.
QuickCheck. Laws. Control. MonadPlus - Test.
QuickCheck. Laws. Control. Plus - Test.
QuickCheck. Laws. Control. Semigroupoid - Test.
QuickCheck. Laws. Data - Test.
QuickCheck. Laws. Data. BooleanAlgebra - Test.
QuickCheck. Laws. Data. Bounded - Test.
QuickCheck. Laws. Data. BoundedEnum - Test.
QuickCheck. Laws. Data. CommutativeRing - Test.
QuickCheck. Laws. Data. DivisionRing - Test.
QuickCheck. Laws. Data. Enum - Test.
QuickCheck. Laws. Data. Eq - Test.
QuickCheck. Laws. Data. EuclideanRing - Test.
QuickCheck. Laws. Data. Field - Test.
QuickCheck. Laws. Data. Foldable - Test.
QuickCheck. Laws. Data. Functor - Test.
QuickCheck. Laws. Data. FunctorWithIndex - Test.
QuickCheck. Laws. Data. HeytingAlgebra - Test.
QuickCheck. Laws. Data. Monoid - Test.
QuickCheck. Laws. Data. Ord - Test.
QuickCheck. Laws. Data. Ring - Test.
QuickCheck. Laws. Data. Semigroup - Test.
QuickCheck. Laws. Data. Semiring