Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Alex D
GHC
Commits
655e4097
Commit
655e4097
authored
Jan 13, 2012
by
Ian Lynagh
Browse files
Add encodeInteger{Double,Float} to the integerConstantFolding test
parent
63afeeb4
Changes
3
Hide whitespace changes
Inline
Side-by-side
testsuite/tests/lib/integer/Makefile
View file @
655e4097
...
...
@@ -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
testsuite/tests/lib/integer/integerConstantFolding.hs
View file @
655e4097
...
...
@@ -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
testsuite/tests/lib/integer/integerConstantFolding.stdout
View file @
655e4097
...
...
@@ -42,3 +42,5 @@ quotInteger: 641
remInteger: 68
doubleFromInteger: 200131.0
floatFromInteger: 200135.0
encodeIntegerDouble: 400276.0
encodeIntegerFloat: 400280.0
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment