[commit: stm] master: add another test for #7493 (7410aad)
Simon Marlow
marlowsd at gmail.com
Tue Dec 18 11:50:57 CET 2012
Repository : ssh://darcs.haskell.org//srv/darcs/packages/stm
On branch : master
http://hackage.haskell.org/trac/ghc/changeset/7410aad6b41ca110b540bc763f84a3cf3ec24a38
>---------------------------------------------------------------
commit 7410aad6b41ca110b540bc763f84a3cf3ec24a38
Author: Simon Marlow <marlowsd at gmail.com>
Date: Tue Dec 18 09:29:44 2012 +0000
add another test for #7493
>---------------------------------------------------------------
tests/all.T | 1 +
tests/stm065.hs | 9 +++++++++
tests/stm065.stdout | 1 +
3 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/tests/all.T b/tests/all.T
index 375c7f6..cab1e2b 100644
--- a/tests/all.T
+++ b/tests/all.T
@@ -39,3 +39,4 @@ test('2411', ignore_output, compile_and_run, ['-package stm'])
test('3049', normal, compile_and_run, ['-package stm'])
test('4057', normal, compile_and_run, ['-package stm'])
test('stm064', normal, compile_and_run, ['-package stm'])
+test('stm065', normal, compile_and_run, ['-package stm'])
diff --git a/tests/stm065.hs b/tests/stm065.hs
new file mode 100644
index 0000000..1e16475
--- /dev/null
+++ b/tests/stm065.hs
@@ -0,0 +1,9 @@
+import Control.Concurrent.STM
+
+main = do
+ x <- atomically $ do
+ r <- newTVar []
+ writeTVar r [2]
+ writeTVar r [] `orElse` return ()
+ readTVar r
+ print x
diff --git a/tests/stm065.stdout b/tests/stm065.stdout
new file mode 100644
index 0000000..fe51488
--- /dev/null
+++ b/tests/stm065.stdout
@@ -0,0 +1 @@
+[]
More information about the Cvs-libraries
mailing list