mirror of
https://github.com/nim-lang/Nim.git
synced 2026-06-03 18:34:43 +00:00
enable unguarded_access test
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
discard """
|
||||
errormsg: "unguarded access: counter"
|
||||
line: 14
|
||||
"""
|
||||
|
||||
import threadpool, locks
|
||||
|
||||
var counterLock: Lock
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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":
|
||||
|
||||
Reference in New Issue
Block a user