diff options
author | Ian Lynagh <igloo@earth.li> | 2011-05-08 21:14:09 +0100 |
---|---|---|
committer | Ian Lynagh <igloo@earth.li> | 2011-05-23 18:52:23 +0100 |
commit | 4a669405efbd83993a3e2361a302a36bea36c00f (patch) | |
tree | f13ffce0552e875e1fa28ddd554ab345cd673dd9 | |
parent | 036830b392a9cceab2ddb7b2abb13ed8c4015dfd (diff) | |
download | haskell-4a669405efbd83993a3e2361a302a36bea36c00f.tar.gz |
Add tests from testsuite/tests/h98
-rw-r--r-- | libraries/base/tests/Makefile | 7 | ||||
-rw-r--r-- | libraries/base/tests/all.T | 4 | ||||
-rw-r--r-- | libraries/base/tests/enumDouble.hs | 3 | ||||
-rw-r--r-- | libraries/base/tests/enumDouble.stdout | 1 | ||||
-rw-r--r-- | libraries/base/tests/enumRatio.hs | 3 | ||||
-rw-r--r-- | libraries/base/tests/enumRatio.stdout | 1 | ||||
-rw-r--r-- | libraries/base/tests/readFloat.hs | 5 | ||||
-rw-r--r-- | libraries/base/tests/readFloat.stderr | 1 |
8 files changed, 25 insertions, 0 deletions
diff --git a/libraries/base/tests/Makefile b/libraries/base/tests/Makefile new file mode 100644 index 0000000000..6a0abcf1cf --- /dev/null +++ b/libraries/base/tests/Makefile @@ -0,0 +1,7 @@ +# This Makefile runs the tests using GHC's testsuite framework. It +# assumes the package is part of a GHC build tree with the testsuite +# installed in ../../../testsuite. + +TOP=../../../testsuite +include $(TOP)/mk/boilerplate.mk +include $(TOP)/mk/test.mk diff --git a/libraries/base/tests/all.T b/libraries/base/tests/all.T new file mode 100644 index 0000000000..4906495c7d --- /dev/null +++ b/libraries/base/tests/all.T @@ -0,0 +1,4 @@ + +test('readFloat', exit_code(1), compile_and_run, ['']) +test('enumDouble', normal, compile_and_run, ['']) +test('enumRatio', normal, compile_and_run, ['']) diff --git a/libraries/base/tests/enumDouble.hs b/libraries/base/tests/enumDouble.hs new file mode 100644 index 0000000000..458607da75 --- /dev/null +++ b/libraries/base/tests/enumDouble.hs @@ -0,0 +1,3 @@ + +main :: IO () +main = print (succ (1.0e20 :: Double)) diff --git a/libraries/base/tests/enumDouble.stdout b/libraries/base/tests/enumDouble.stdout new file mode 100644 index 0000000000..a5093aa088 --- /dev/null +++ b/libraries/base/tests/enumDouble.stdout @@ -0,0 +1 @@ +1.0e20 diff --git a/libraries/base/tests/enumRatio.hs b/libraries/base/tests/enumRatio.hs new file mode 100644 index 0000000000..79b733ebed --- /dev/null +++ b/libraries/base/tests/enumRatio.hs @@ -0,0 +1,3 @@ + +import Data.Ratio +main = print [ 1, 4%(3::Int) .. 1 ] diff --git a/libraries/base/tests/enumRatio.stdout b/libraries/base/tests/enumRatio.stdout new file mode 100644 index 0000000000..0d5cbafde6 --- /dev/null +++ b/libraries/base/tests/enumRatio.stdout @@ -0,0 +1 @@ +[1 % 1] diff --git a/libraries/base/tests/readFloat.hs b/libraries/base/tests/readFloat.hs new file mode 100644 index 0000000000..02fd48ec91 --- /dev/null +++ b/libraries/base/tests/readFloat.hs @@ -0,0 +1,5 @@ + +import Numeric + +main :: IO () +main = putStrLn $ showFloat (read "" :: Float) "" diff --git a/libraries/base/tests/readFloat.stderr b/libraries/base/tests/readFloat.stderr new file mode 100644 index 0000000000..929906187e --- /dev/null +++ b/libraries/base/tests/readFloat.stderr @@ -0,0 +1 @@ +readFloat: Prelude.read: no parse |