Repository : ssh://darcs.haskell.org//srv/darcs/packages/base On branch : master
http://hackage.haskell.org/trac/ghc/changeset/7674b5ceb535158e54f65182b7e94be64931613f >--------------------------------------------------------------- commit 7674b5ceb535158e54f65182b7e94be64931613f Author: Ian Lynagh <[email protected]> Date: Sat Nov 19 22:17:33 2011 +0000 Move testsuite/tests/lib/Data.Fixed test to base/tests >--------------------------------------------------------------- tests/all.T | 1 + tests/data-fixed-show-read.hs | 22 ++++++++++++++++++++++ tests/data-fixed-show-read.stdout | 18 ++++++++++++++++++ 3 files changed, 41 insertions(+), 0 deletions(-) diff --git a/tests/all.T b/tests/all.T index d4b3bbd..eb63bb7 100644 --- a/tests/all.T +++ b/tests/all.T @@ -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, ['']) diff --git a/tests/data-fixed-show-read.hs b/tests/data-fixed-show-read.hs new file mode 100644 index 0000000..349f639 --- /dev/null +++ b/tests/data-fixed-show-read.hs @@ -0,0 +1,22 @@ + +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 diff --git a/tests/data-fixed-show-read.stdout b/tests/data-fixed-show-read.stdout new file mode 100644 index 0000000..0e5d7ca --- /dev/null +++ b/tests/data-fixed-show-read.stdout @@ -0,0 +1,18 @@ +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 _______________________________________________ Cvs-libraries mailing list [email protected] http://www.haskell.org/mailman/listinfo/cvs-libraries
