require errormsg to be specified before file.

This commit is contained in:
Arne Döring 2018-11-29 16:07:51 +01:00 • committed by Araq
commit 1105d03644
264 changed files with 305 additions and 623 deletions

View file

@ -1,10 +1,9 @@
discard """
line: 9
errormsg: "undeclared identifier: '%'"
line: 9
"""
import strutils except `%`
# doesn't work
echo "$1" % "abc"

View file

@ -1,6 +1,6 @@
discard """
line: 8
errormsg: "public implementation 'tmismatchedvisibility.foo(a: int)[declared in tmismatchedvisibility.nim(6, 5)]' has non-public forward declaration in "
line: 8
"""
proc foo(a: int): int

View file

@ -1,12 +1,10 @@
discard """
errormsg: "undeclared identifier: \'global\'"
file: "tnamspc.nim"
line: 10
errormsg: "undeclared identifier: \'global\'"
"""
# Test17 - test correct handling of namespaces
import mnamspc1
global = 9 #ERROR

View file

@ -1,6 +1,6 @@
discard """
file: "tnotuniquename/mnotuniquename.nim"
errormsg: "module names need to be unique per Nimble package"
file: "tnotuniquename/mnotuniquename.nim"
"""
import mnotuniquename

View file

@ -1,6 +1,6 @@
discard """
file: "tnotuniquename/mnotuniquename.nim"
errormsg: "module names need to be unique per Nimble package"
file: "tnotuniquename/mnotuniquename.nim"
"""
import mnotuniquename

View file

@ -1,7 +1,7 @@
discard """
errormsg: "undeclared field: \'buffer\'"
file: "topaque.nim"
line: 16
errormsg: "undeclared field: \'buffer\'"
"""
# Test the new opaque types
@ -14,5 +14,3 @@ var
L.filename = "ha"
L.line = 34
L.buffer[0] = '\0' #ERROR_MSG undeclared field: 'buffer'

View file

@ -1,12 +1,10 @@
discard """
errormsg: "recursive dependency: 'trecincb.nim'"
file: "trecincb.nim"
line: 9
errormsg: "recursive dependency: 'trecincb.nim'"
"""
# Test recursive includes
include trecincb
echo "trecina"

View file

@ -1,7 +1,7 @@
discard """
errormsg: "recursive dependency: 'trecincb.nim'"
file: "trecincb.nim"
line: 9
errormsg: "recursive dependency: 'trecincb.nim'"
"""
# Test recursive includes
@ -9,5 +9,3 @@ discard """
include trecincb
echo "trecinb"

View file

@ -1,7 +1,7 @@
discard """
errormsg: "recursive module dependency detected"
file: "mrecmod.nim"
line: 1
errormsg: "recursive module dependency detected"
disabled: true
"""
# recursive module

View file

@ -1,9 +1,8 @@
discard """
errormsg: "A module cannot import itself"
file: "tselfimport.nim"
line: 7
errormsg: "A module cannot import itself"
"""
import strutils as su # guard against regression
import tselfimport #ERROR
echo("Hello World")