diff options
author | Ian Lynagh <igloo@earth.li> | 2011-11-19 22:37:56 +0000 |
---|---|---|
committer | Ian Lynagh <igloo@earth.li> | 2011-11-19 22:37:56 +0000 |
commit | 1a9b04d900793179f90898908fdaf7db989bdec1 (patch) | |
tree | b297d33102562d3e4de856ac31de78061d1f9e9c /libraries/base/tests/Numeric/num007.hs | |
parent | 7593ffdacb728b2a9fdc8fa59950df5b037afdfd (diff) | |
download | haskell-1a9b04d900793179f90898908fdaf7db989bdec1.tar.gz |
Move testsuite/tests/lib/Numeric to base/tests
Diffstat (limited to 'libraries/base/tests/Numeric/num007.hs')
-rw-r--r-- | libraries/base/tests/Numeric/num007.hs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/libraries/base/tests/Numeric/num007.hs b/libraries/base/tests/Numeric/num007.hs new file mode 100644 index 0000000000..1c40ecfdbd --- /dev/null +++ b/libraries/base/tests/Numeric/num007.hs @@ -0,0 +1,17 @@ +-- Exercising the reading of positive numbers at various bases. +-- +module Main(main) where + +import Numeric + +main = + do + putStrLn (show (readOct "00000111")) + putStrLn (show (readDec "00000111")) + putStrLn (show (readHex "00000111")) + putStrLn (show (readOct "-24")) + putStrLn (show (readDec "-24")) + putStrLn (show (readHex "-24")) + putStrLn (show ((readOct ::ReadS Integer) "3248784372843778438743")) + putStrLn (show ((readDec ::ReadS Integer) "3248784372843778438743")) + putStrLn (show ((readHex ::ReadS Integer) "3248784372843778438743")) |