Commit 90e8b87f authored by Ian Lynagh's avatar Ian Lynagh
Browse files

Move testsuite/tests/lib/Data.Fixed test to base/tests

parent 7e260784
......@@ -16,4 +16,5 @@ test('unicode002',
if_platform('i386-unknown-openbsd', expect_fail),
compile_and_run,
[''])
test('data-fixed-show-read', normal, compile_and_run, [''])
module Main (main) where
import Data.Fixed
main :: IO ()
main = do doit 38.001
doit 38.009
doit 38.01
doit 38.09
print (read "38" :: Centi)
doit (-38.001)
doit (-38.009)
doit (-38.01)
doit (-38.09)
print (read "-38" :: Centi)
doit :: Centi -> IO ()
doit c = do let s = show c
r = read s :: Centi
putStrLn s
print r
38.00
38.00
38.00
38.00
38.01
38.01
38.09
38.09
38.00
-38.00
-38.00
-38.00
-38.00
-38.01
-38.01
-38.09
-38.09
-38.00
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