diff options
author | Ian Lynagh <igloo@earth.li> | 2012-07-13 19:44:47 +0100 |
---|---|---|
committer | Ian Lynagh <igloo@earth.li> | 2012-07-13 19:44:47 +0100 |
commit | ce68b757b3620e75e330f77cc1ed1d491292ff3e (patch) | |
tree | 89da162889084b07ebe3a35710a3184700c7f93e /testsuite/tests/lib/integer/gcdInteger.hs | |
parent | 16e79b16926148f82a98cf6f36f520089629a898 (diff) | |
download | haskell-ce68b757b3620e75e330f77cc1ed1d491292ff3e.tar.gz |
Add a couple of tests for gcdInteger
Diffstat (limited to 'testsuite/tests/lib/integer/gcdInteger.hs')
-rw-r--r-- | testsuite/tests/lib/integer/gcdInteger.hs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/testsuite/tests/lib/integer/gcdInteger.hs b/testsuite/tests/lib/integer/gcdInteger.hs new file mode 100644 index 0000000000..2e945a876a --- /dev/null +++ b/testsuite/tests/lib/integer/gcdInteger.hs @@ -0,0 +1,17 @@ + +{-# LANGUAGE MagicHash #-} + +module Main (main) where + +import GHC.Base +import GHC.Integer + +main :: IO () +main = case i of + I# i# -> + print (gcd (smallInteger i#) (smallInteger i#)) + +{-# NOINLINE i #-} +i :: Int +i = minBound + |