summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Klebinger <klebinger.andreas@gmx.at>2020-06-24 23:35:33 +0200
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-07-02 02:54:54 -0400
commit44d6a3352d708785b75aeb616bfc7efff839184e (patch)
tree4727140f697df290cc80f2a2968f87aee77d935f
parent76d8cc744977d98f6a427b1816198709e2d2e856 (diff)
downloadhaskell-44d6a3352d708785b75aeb616bfc7efff839184e.tar.gz
T16012: Be verbose on failure.
-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