require errormsg to be specified before file.
This commit is contained in:
parent
ca394ebd95
commit
1105d03644
264 changed files with 305 additions and 623 deletions
|
|
@ -1,6 +1,6 @@
|
|||
discard """
|
||||
line: 13
|
||||
errormsg: "case statement cannot work on enums with holes for computed goto"
|
||||
line: 13
|
||||
"""
|
||||
|
||||
type
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
discard """
|
||||
line: 13
|
||||
errormsg: "duplicate case label"
|
||||
line: 13
|
||||
"""
|
||||
|
||||
type
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
discard """
|
||||
line: 13
|
||||
errormsg: "duplicate case label"
|
||||
line: 13
|
||||
"""
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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")
|
||||
))
|
||||
))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue