@@ -4,8 +4,8 @@ module Tests.Properties.Mul (tests) where
44
55import Control.Applicative ((<$>), pure)
66import Control.Exception as E (SomeException, catch, evaluate)
7−import Data.Int (Int64)
8−import Data.Text.Internal (mul, mul64)
7+import Data.Int (Int32, Int64)
8+import Data.Text.Internal (mul, mul32, mul64)
99import System.IO.Unsafe (unsafePerformIO)
1010import Test.Framework (Test)
1111import Test.Framework.Providers.QuickCheck2 (testProperty)
@@ -23,6 +23,9 @@ eval :: (a -> b -> c) -> a -> b -> Maybe c
2323eval f a b = unsafePerformIO $
2424 (Just <$> evaluate (f a b)) `E.catch` (\(_::SomeException) -> pure Nothing)
2525
26+t_mul32 :: Int32 -> Int32 -> Property
27+t_mul32 a b = mulRef a b === eval mul32 a b
28+
2629t_mul64 :: Int64 -> Int64 -> Property
2730t_mul64 a b = mulRef a b === eval mul64 a b
2831
@@ -32,5 +35,6 @@ t_mul a b = mulRef a b === eval mul a b
3235tests :: [Test]
3336tests = [
3437 testProperty "t_mul" t_mul
38+ , testProperty "t_mul32" t_mul32
3539 , testProperty "t_mul64" t_mul64
3640 ]