summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Klebinger <klebinger.andreas@gmx.at>2020-06-24 23:35:33 +0200
committerAndreas Klebinger <klebinger.andreas@gmx.at>2020-07-01 07:42:09 -0400
commitc33d78ee4940e8b399fb0e09fc3bd9e9488b206f (patch)
treefde7a2aef6e341b79c958c8a8719151102ebd7e9
parent85310fb83fdb7d7294bd453026102fc42000bf14 (diff)
downloadhaskell-wip/andreask/T16012.tar.gz
T16012: Be verbose on failure.wip/andreask/T16012
-rw-r--r--testsuite/tests/ghci/should_run/T16012.script6
-rw-r--r--testsuite/tests/ghci/should_run/T16012.stdout2
2 files changed, 6 insertions, 2 deletions
diff --git a/testsuite/tests/ghci/should_run/T16012.script b/testsuite/tests/ghci/should_run/T16012.script
index f91b037770..ab8b2d0ee0 100644
--- a/testsuite/tests/ghci/should_run/T16012.script
+++ b/testsuite/tests/ghci/should_run/T16012.script
@@ -1,2 +1,6 @@
+-- We expect the allocation counter to be initialized to zero and to count down.
+-- As ghc expressions are executed in their own thread a call to getAllocationCounter
+-- should always return a reasonably low result.
+
n <- System.Mem.getAllocationCounter
-(n < 0 && n >= -160000)
+if (n < 0 && n >= -160000) then putStrLn "Alloction counter in expected range" else (putStrLn $ "Unexpected allocation counter result:" ++ show n)
diff --git a/testsuite/tests/ghci/should_run/T16012.stdout b/testsuite/tests/ghci/should_run/T16012.stdout
index 0ca95142bb..2eb23fdb4c 100644
--- a/testsuite/tests/ghci/should_run/T16012.stdout
+++ b/testsuite/tests/ghci/should_run/T16012.stdout
@@ -1 +1 @@
-True
+Alloction counter in expected range