enable unguarded_access test

This commit is contained in:
Andreas Rumpf
2017-10-02 23:35:56 +02:00
parent a883005f65
commit 9d4f5c6d2c
3 changed files with 7 additions and 6 deletions

View File

@@ -1,3 +1,8 @@
discard """
errormsg: "unguarded access: counter"
line: 14
"""
import threadpool, locks
var counterLock: Lock

View File

@@ -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

View File

@@ -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":