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,6 +1,6 @@
discard """
line: 13
errormsg: "case statement cannot work on enums with holes for computed goto"
line: 13
"""
type

View file

@ -1,13 +1,17 @@
discard """
errormsg: "type mismatch: got <string> but expected 'int'"
line: 33
file: "tcaseexpr1.nim"
line: 29
errormsg: "type mismatch: got <string> but expected 'int'"
line: 23
errormsg: "not all cases are covered"
line: 27
file: "tcaseexpr1.nim"
"""
# NOTE: This spec is wrong. Spec doesn't support multiple error
# messages. The first one is simply overridden by the second one.
# This just has never been noticed.
type
E = enum A, B, C
@ -27,4 +31,3 @@ var t1 = case x:
var t2 = case x:
of A: 10
of B, C: "23"

View file

@ -1,6 +1,6 @@
discard """
line: 13
errormsg: "duplicate case label"
line: 13
"""
type

View file

@ -1,6 +1,6 @@
discard """
line: 13
errormsg: "duplicate case label"
line: 13
"""

View file

@ -1,6 +1,5 @@
discard """
file: "tcasestmt.nim"
output:
output:
'''
Not found!
Found!
@ -226,4 +225,4 @@ block tcasestm:
"invalid Y".quit(3)
true
else: raise newException(ValueError, "Invalid")
))
))