From 9d4f5c6d2cc8b1bfb709f14b9e8d21725d7d56a3 Mon Sep 17 00:00:00 2001 From: Andreas Rumpf Date: Mon, 2 Oct 2017 23:35:56 +0200 Subject: [PATCH] enable unguarded_access test --- .../Chapter6/WikipediaStats/unguarded_access.nim | 5 +++++ tests/testament/categories.nim | 6 +----- tests/testament/specs.nim | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/tests/niminaction/Chapter6/WikipediaStats/unguarded_access.nim b/tests/niminaction/Chapter6/WikipediaStats/unguarded_access.nim index 72e8bff120..502ea61a99 100644 --- a/tests/niminaction/Chapter6/WikipediaStats/unguarded_access.nim +++ b/tests/niminaction/Chapter6/WikipediaStats/unguarded_access.nim @@ -1,3 +1,8 @@ +discard """ + errormsg: "unguarded access: counter" + line: 14 +""" + import threadpool, locks var counterLock: Lock diff --git a/tests/testament/categories.nim b/tests/testament/categories.nim index f71a4a1e72..a93c79f5cc 100644 --- a/tests/testament/categories.nim +++ b/tests/testament/categories.nim @@ -259,6 +259,7 @@ proc testNimInAction(r: var TResults, cat: Category, options: string) = "niminaction/Chapter6/WikipediaStats/parallel_counts", "niminaction/Chapter6/WikipediaStats/race_condition", "niminaction/Chapter6/WikipediaStats/sequential_counts", + "niminaction/Chapter6/WikipediaStats/unguarded_access", "niminaction/Chapter7/Tweeter/src/tweeter", "niminaction/Chapter7/Tweeter/src/createDatabase", "niminaction/Chapter7/Tweeter/tests/database_test", @@ -267,11 +268,6 @@ proc testNimInAction(r: var TResults, cat: Category, options: string) = for testfile in tests: test "tests/" & testfile & ".nim", actionCompile - # TODO: This doesn't work for some reason ;\ - # let reject = "tests/niminaction/Chapter6/WikipediaStats" & - # "/unguarded_access.nim" - # test reject, actionReject - let jsFile = "tests/niminaction/Chapter8/canvas/canvas_test.nim" testJS jsFile diff --git a/tests/testament/specs.nim b/tests/testament/specs.nim index ed435465a2..89e786d481 100644 --- a/tests/testament/specs.nim +++ b/tests/testament/specs.nim @@ -153,7 +153,7 @@ proc parseSpec*(filename: string): TSpec = result.msg = e.value if result.action != actionRun: result.action = actionCompile - of "errormsg": + of "errormsg", "errmsg": result.msg = e.value result.action = actionReject of "nimout":