test can fail because of invalid spec

This commit is contained in:
Arne Döring 2018-11-28 12:51:41 +01:00 • committed by Araq
commit 199018ef2e
3 changed files with 34 additions and 19 deletions

View file

@ -347,9 +347,14 @@ proc compilerOutputTests(test: TTest, target: TTarget, given: var TSpec,
proc testSpec(r: var TResults, test: TTest, targets: set[TTarget] = {}) =
var expected = test.spec
if expected.parseErrors.len > 0:
# targetC is a lie, but parameter is required
r.addResult(test, targetC, "", expected.parseErrors, reInvalidSpec)
inc(r.total)
return
if expected.err == reIgnored:
# targetC is a lie
# targetC is a lie, but parameter is required
r.addResult(test, targetC, "", "", reIgnored)
inc(r.skipped)
inc(r.total)