[commit: base] master: Add tests from testsuite/tests/h98 (be2750a)
Ian Lynagh
igloo at earth.li
Mon May 23 21:57:33 CEST 2011
Repository : ssh://darcs.haskell.org//srv/darcs/packages/base
On branch : master
http://hackage.haskell.org/trac/ghc/changeset/be2750a0a11b919fb03cc070074e430f88bdfa90
>---------------------------------------------------------------
commit be2750a0a11b919fb03cc070074e430f88bdfa90
Author: Ian Lynagh <igloo at earth.li>
Date: Sun May 8 21:14:09 2011 +0100
Add tests from testsuite/tests/h98
>---------------------------------------------------------------
tests/Makefile | 7 +++++++
tests/all.T | 4 ++++
tests/enumDouble.hs | 3 +++
tests/enumDouble.stdout | 1 +
tests/enumRatio.hs | 3 +++
tests/enumRatio.stdout | 1 +
tests/readFloat.hs | 5 +++++
tests/readFloat.stderr | 1 +
8 files changed, 25 insertions(+), 0 deletions(-)
diff --git a/tests/Makefile b/tests/Makefile
new file mode 100644
index 0000000..6a0abcf
--- /dev/null
+++ b/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/tests/all.T b/tests/all.T
new file mode 100644
index 0000000..4906495
--- /dev/null
+++ b/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/tests/enumDouble.hs b/tests/enumDouble.hs
new file mode 100644
index 0000000..458607d
--- /dev/null
+++ b/tests/enumDouble.hs
@@ -0,0 +1,3 @@
+
+main :: IO ()
+main = print (succ (1.0e20 :: Double))
diff --git a/tests/enumDouble.stdout b/tests/enumDouble.stdout
new file mode 100644
index 0000000..a5093aa
--- /dev/null
+++ b/tests/enumDouble.stdout
@@ -0,0 +1 @@
+1.0e20
diff --git a/tests/enumRatio.hs b/tests/enumRatio.hs
new file mode 100644
index 0000000..79b733e
--- /dev/null
+++ b/tests/enumRatio.hs
@@ -0,0 +1,3 @@
+
+import Data.Ratio
+main = print [ 1, 4%(3::Int) .. 1 ]
diff --git a/tests/enumRatio.stdout b/tests/enumRatio.stdout
new file mode 100644
index 0000000..0d5cbaf
--- /dev/null
+++ b/tests/enumRatio.stdout
@@ -0,0 +1 @@
+[1 % 1]
diff --git a/tests/readFloat.hs b/tests/readFloat.hs
new file mode 100644
index 0000000..02fd48e
--- /dev/null
+++ b/tests/readFloat.hs
@@ -0,0 +1,5 @@
+
+import Numeric
+
+main :: IO ()
+main = putStrLn $ showFloat (read "" :: Float) ""
diff --git a/tests/readFloat.stderr b/tests/readFloat.stderr
new file mode 100644
index 0000000..9299061
--- /dev/null
+++ b/tests/readFloat.stderr
@@ -0,0 +1 @@
+readFloat: Prelude.read: no parse
More information about the Cvs-libraries
mailing list