Commits

Bryan O'Sullivan committed edb2d21

Test mul32

Comments (0)

Files changed (1)

tests/Tests/Properties/Mul.hs

 
 import Control.Applicative ((<$>), pure)
 import Control.Exception as E (SomeException, catch, evaluate)
-import Data.Int (Int64)
-import Data.Text.Internal (mul, mul64)
+import Data.Int (Int32, Int64)
+import Data.Text.Internal (mul, mul32, mul64)
 import System.IO.Unsafe (unsafePerformIO)
 import Test.Framework (Test)
 import Test.Framework.Providers.QuickCheck2 (testProperty)
 eval f a b = unsafePerformIO $
   (Just <$> evaluate (f a b)) `E.catch` (\(_::SomeException) -> pure Nothing)
 
+t_mul32 :: Int32 -> Int32 -> Property
+t_mul32 a b = mulRef a b === eval mul32 a b
+
 t_mul64 :: Int64 -> Int64 -> Property
 t_mul64 a b = mulRef a b === eval mul64 a b
 
 tests :: [Test]
 tests = [
    testProperty "t_mul" t_mul
+ , testProperty "t_mul32" t_mul32
  , testProperty "t_mul64" t_mul64
  ]