Repository : ssh://darcs.haskell.org//srv/darcs/testsuite

On branch  : ghc-7.4

http://hackage.haskell.org/trac/ghc/changeset/92d97a2e2685ca2485bf511fc1f1b5f77b19c62b

>---------------------------------------------------------------

commit 92d97a2e2685ca2485bf511fc1f1b5f77b19c62b
Author: Ian Lynagh <[email protected]>
Date:   Fri Jan 13 18:58:57 2012 +0000

    Add encodeInteger{Double,Float} to the integerConstantFolding test

>---------------------------------------------------------------

 tests/lib/integer/Makefile                      |    2 ++
 tests/lib/integer/integerConstantFolding.hs     |    8 ++++++++
 tests/lib/integer/integerConstantFolding.stdout |    2 ++
 3 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/tests/lib/integer/Makefile b/tests/lib/integer/Makefile
index 297f9f0..5199157 100644
--- a/tests/lib/integer/Makefile
+++ b/tests/lib/integer/Makefile
@@ -32,5 +32,7 @@ integerConstantFolding:
        $(call CHECK,\<68\>,remInteger)
        $(call CHECK,\<200131.0\>,doubleFromInteger)
        $(call CHECK,\<200135.0\>,floatFromInteger)
+       $(call CHECK,\<400276.0\>,encodeIntegerDouble)
+       $(call CHECK,\<400280.0\>,encodeIntegerFloat)
        ./integerConstantFolding
 
diff --git a/tests/lib/integer/integerConstantFolding.hs 
b/tests/lib/integer/integerConstantFolding.hs
index 1fdd099..16aecfe 100644
--- a/tests/lib/integer/integerConstantFolding.hs
+++ b/tests/lib/integer/integerConstantFolding.hs
@@ -48,6 +48,8 @@ main = do p "plusInteger"        plusInteger
           p "remInteger"        remInteger
           p "doubleFromInteger" doubleFromInteger
           p "floatFromInteger"  floatFromInteger
+          p "encodeIntegerDouble" encodeIntegerDouble
+          p "encodeIntegerFloat"  encodeIntegerFloat
 
     where p :: Show a => String -> a -> IO ()
           p str x = putStrLn (str ++ ": " ++ show x)
@@ -171,3 +173,9 @@ doubleFromInteger = fromInteger 100065 + 100066
 floatFromInteger :: Float
 floatFromInteger = fromInteger 100067 + 100068
 
+encodeIntegerDouble :: Double
+encodeIntegerDouble = encodeFloat 100069 2
+
+encodeIntegerFloat :: Float
+encodeIntegerFloat = encodeFloat 100070 2
+
diff --git a/tests/lib/integer/integerConstantFolding.stdout 
b/tests/lib/integer/integerConstantFolding.stdout
index 7c32328..2a241a3 100644
--- a/tests/lib/integer/integerConstantFolding.stdout
+++ b/tests/lib/integer/integerConstantFolding.stdout
@@ -42,3 +42,5 @@ quotInteger: 641
 remInteger: 68
 doubleFromInteger: 200131.0
 floatFromInteger: 200135.0
+encodeIntegerDouble: 400276.0
+encodeIntegerFloat: 400280.0



_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to