summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/tests/primops/should_run/UnliftedTVar2.hs8
-rw-r--r--testsuite/tests/primops/should_run/UnliftedTVar2.stdout1
2 files changed, 7 insertions, 2 deletions
diff --git a/testsuite/tests/primops/should_run/UnliftedTVar2.hs b/testsuite/tests/primops/should_run/UnliftedTVar2.hs
index 70cbce18a8..5e87007e2b 100644
--- a/testsuite/tests/primops/should_run/UnliftedTVar2.hs
+++ b/testsuite/tests/primops/should_run/UnliftedTVar2.hs
@@ -7,6 +7,7 @@
module Main where
+import Control.Monad
import Data.Kind
import GHC.Exts
import GHC.IO
@@ -28,7 +29,12 @@ main = do
case readTVarIO# tvar s4 of
(# s5, U res #) ->
(# s5, ( I# r, I# res ) #)
- print (x == y, x > 100000)
+ unless (x > 100000) $ do
+ print (x,y)
+ fail "not enough iterations"
+ unless (x <= y) $ do
+ print (x,y)
+ fail "mismatch"
increment :: TVar# RealWorld U -> State# RealWorld -> (# State# RealWorld, Int #)
increment tvar = go
diff --git a/testsuite/tests/primops/should_run/UnliftedTVar2.stdout b/testsuite/tests/primops/should_run/UnliftedTVar2.stdout
deleted file mode 100644
index 1fa0b54b36..0000000000
--- a/testsuite/tests/primops/should_run/UnliftedTVar2.stdout
+++ /dev/null
@@ -1 +0,0 @@
-(True,True)