diff options
-rw-r--r-- | testsuite/tests/ghci/should_run/T16012.script | 6 | ||||
-rw-r--r-- | testsuite/tests/ghci/should_run/T16012.stdout | 2 |
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 |