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: 6
|
||||
errormsg: "invalid type: 'openarray[int]' for result"
|
||||
line: 6
|
||||
"""
|
||||
|
||||
proc foo(a: openArray[int]):auto = a
|
||||
|
|
|
|||
|
|
@ -1,12 +1,9 @@
|
|||
discard """
|
||||
errormsg: "invalid type"
|
||||
file: "topena1.nim"
|
||||
line: 9
|
||||
errormsg: "invalid type"
|
||||
"""
|
||||
# Tests a special bug
|
||||
|
||||
var
|
||||
x: ref openarray[string] #ERROR_MSG invalid type
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
discard """
|
||||
file: "topenarrayrepr.nim"
|
||||
output: "5 - [1]"
|
||||
"""
|
||||
type
|
||||
|
|
@ -12,6 +11,3 @@ proc Bar(n: int, m: openarray[int64]) =
|
|||
echo($n & " - " & repr(m))
|
||||
|
||||
Foo(5, Bar) #OUT 5 - [1]
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
discard """
|
||||
file: "topenlen.nim"
|
||||
output: "7"
|
||||
"""
|
||||
# Tests a special bug
|
||||
|
|
@ -14,5 +13,3 @@ proc p(a, b: openarray[string]): int =
|
|||
|
||||
discard choose(["sh", "-c", $p([""], ["a"])])
|
||||
echo($p(["", "ha", "abc"], ["xyz"])) #OUT 7
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
discard """
|
||||
file: "tptrarrayderef.nim"
|
||||
output: "OK"
|
||||
"""
|
||||
|
||||
|
|
@ -15,7 +14,7 @@ var
|
|||
proc mutate[T](arr:openarray[T], brr: openArray[T]) =
|
||||
for i in 0..arr.len-1:
|
||||
doAssert(arr[i] == brr[i])
|
||||
|
||||
|
||||
mutate(arr, arr)
|
||||
|
||||
#bug #2240
|
||||
|
|
@ -46,9 +45,9 @@ proc getFilledBuffer(sz: int): ref seq[char] =
|
|||
s[] = newSeq[char](sz)
|
||||
fillBuffer(s[])
|
||||
return s
|
||||
|
||||
|
||||
let aa = getFilledBuffer(3)
|
||||
for i in 0..aa[].len-1:
|
||||
doAssert(aa[i] == chr(i))
|
||||
|
||||
echo "OK"
|
||||
|
||||
echo "OK"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue