Commit 655e4097 authored by Ian Lynagh's avatar Ian Lynagh
Browse files

Add encodeInteger{Double,Float} to the integerConstantFolding test

parent 63afeeb4
......@@ -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
......@@ -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
......@@ -42,3 +42,5 @@ quotInteger: 641
remInteger: 68
doubleFromInteger: 200131.0
floatFromInteger: 200135.0
encodeIntegerDouble: 400276.0
encodeIntegerFloat: 400280.0
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment