cleanup tests; don't use non-working 'msg' spec field
This commit is contained in:
parent
2d0aa9b72b
commit
562d185cb7
31 changed files with 60 additions and 59 deletions
|
|
@ -1,5 +1,4 @@
|
||||||
discard """
|
discard """
|
||||||
file: "tissues.nim"
|
|
||||||
output: '''
|
output: '''
|
||||||
20.0 USD
|
20.0 USD
|
||||||
Printable
|
Printable
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ output: '''10
|
||||||
10
|
10
|
||||||
|
|
||||||
1'''
|
1'''
|
||||||
msg: '''
|
nimout: '''
|
||||||
K=string V=int
|
K=string V=int
|
||||||
K=int64 V=string
|
K=int64 V=string
|
||||||
K=int V=int
|
K=int V=int
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
discard """
|
discard """
|
||||||
output: "0\n0\n0"
|
output: "0\n0\n0"
|
||||||
msg: '''
|
nimout: '''
|
||||||
R=3 C=3 TE=9 FF=14 FC=20 T=int
|
R=3 C=3 TE=9 FF=14 FC=20 T=int
|
||||||
R=3 C=3 T=int
|
R=3 C=3 T=int
|
||||||
'''
|
'''
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
discard """
|
discard """
|
||||||
output: "20\n10"
|
output: "20\n10"
|
||||||
msg: '''
|
nimout: '''
|
||||||
INFERRED int
|
INFERRED int
|
||||||
VALUE TYPE int
|
VALUE TYPE int
|
||||||
VALUE TYPE NAME INT
|
VALUE TYPE NAME INT
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
discard """
|
discard """
|
||||||
msg: "array[0..3, int]"
|
nimout: "array[0..3, int]"
|
||||||
"""
|
"""
|
||||||
|
|
||||||
type
|
type
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
discard """
|
discard """
|
||||||
msg: '''initApple
|
nimout: '''initApple
|
||||||
deinitApple
|
deinitApple
|
||||||
Coral
|
Coral
|
||||||
enum
|
enum
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
discard """
|
discard """
|
||||||
msg: '''nnkStmtList.newTree(
|
nimout: '''nnkStmtList.newTree(
|
||||||
nnkVarSection.newTree(
|
nnkVarSection.newTree(
|
||||||
nnkIdentDefs.newTree(
|
nnkIdentDefs.newTree(
|
||||||
newIdentNode("x"),
|
newIdentNode("x"),
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,14 @@
|
||||||
discard """
|
discard """
|
||||||
msg: '''StmtList
|
nimout: '''
|
||||||
|
StmtList
|
||||||
VarSection
|
VarSection
|
||||||
IdentDefs
|
IdentDefs
|
||||||
Ident !"x"
|
Ident "x"
|
||||||
Empty
|
Empty
|
||||||
Call
|
Call
|
||||||
DotExpr
|
DotExpr
|
||||||
Ident !"foo"
|
Ident "foo"
|
||||||
Ident !"create"
|
Ident "create"
|
||||||
IntLit 56'''
|
IntLit 56'''
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
discard """
|
discard """
|
||||||
msg: '''"muhaha"
|
nimout: '''"muhaha"
|
||||||
proc poo(x, y: int) =
|
proc poo(x, y: int) =
|
||||||
let y = x
|
let y = x
|
||||||
echo ["poo"]'''
|
echo ["poo"]'''
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,10 @@
|
||||||
discard """
|
discard """
|
||||||
file: "tmacrogenerics.nim"
|
file: "tmacrogenerics.nim"
|
||||||
msg: '''
|
nimout: '''
|
||||||
instantiation 1 with typedesc and typedesc
|
instantiation 1 with None and None
|
||||||
counter: 1
|
instantiation 2 with None and None
|
||||||
|
instantiation 3 with None and None
|
||||||
|
counter: 3
|
||||||
'''
|
'''
|
||||||
output: "int\nfloat\nint\nstring"
|
output: "int\nfloat\nint\nstring"
|
||||||
"""
|
"""
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,10 @@
|
||||||
discard """
|
discard """
|
||||||
msg: '''
|
nimout: '''
|
||||||
proc init(foo129050: int; bar129052: typedesc[int]): int =
|
|
||||||
foo129050
|
|
||||||
|
|
||||||
IntLit 5
|
IntLit 5
|
||||||
proc (x: int): string => typeDesc[proc[string, int]]
|
proc (x: int): string => typeDesc[proc[string, int]]
|
||||||
proc (x: int): void => typeDesc[proc[void, int]]
|
proc (x: int): void => typeDesc[proc[void, int]]
|
||||||
proc (x: int) => typeDesc[proc[void, int]]
|
proc (x: int) => typeDesc[proc[void, int]]
|
||||||
x => uncheckedArray[int]
|
x => UncheckedArray[int]
|
||||||
a
|
a
|
||||||
s
|
s
|
||||||
d
|
d
|
||||||
|
|
@ -43,7 +40,7 @@ block t7723:
|
||||||
proc init(foo: int, bar: typedesc[int]): int =
|
proc init(foo: int, bar: typedesc[int]): int =
|
||||||
foo
|
foo
|
||||||
|
|
||||||
expandMacros:
|
#expandMacros:
|
||||||
foo1()
|
foo1()
|
||||||
|
|
||||||
doAssert init(1, int) == 1
|
doAssert init(1, int) == 1
|
||||||
|
|
@ -144,11 +141,11 @@ block t1140:
|
||||||
result.parse_template body[1].strVal
|
result.parse_template body[1].strVal
|
||||||
|
|
||||||
|
|
||||||
proc actual: string = tmpli html"""
|
proc actual: string {.used.} = tmpli html"""
|
||||||
<p>Test!</p>
|
<p>Test!</p>
|
||||||
"""
|
"""
|
||||||
|
|
||||||
proc another: string = tmpli html"""
|
proc another: string {.used.} = tmpli html"""
|
||||||
<p>what</p>
|
<p>what</p>
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,14 @@
|
||||||
discard """
|
discard """
|
||||||
msg: '''
|
nimout: '''
|
||||||
range[0 .. 100]
|
Infix
|
||||||
array[0 .. 100, int]
|
Ident "=>"
|
||||||
10
|
Call
|
||||||
test
|
Ident "name"
|
||||||
|
Ident "a"
|
||||||
|
ExprColonExpr
|
||||||
|
Ident "b"
|
||||||
|
Ident "cint"
|
||||||
|
NilLit
|
||||||
'''
|
'''
|
||||||
|
|
||||||
output: '''
|
output: '''
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
discard """
|
discard """
|
||||||
msg: '''letters
|
nimout: '''
|
||||||
|
letters
|
||||||
aa
|
aa
|
||||||
bb
|
bb
|
||||||
numbers
|
numbers
|
||||||
|
|
@ -8,7 +9,7 @@ numbers
|
||||||
AST a
|
AST a
|
||||||
[(11, 22), (33, 44)]
|
[(11, 22), (33, 44)]
|
||||||
AST b
|
AST b
|
||||||
(e: [55, 66], f: [77, 88])
|
([55, 66], [77, 88])
|
||||||
55
|
55
|
||||||
10
|
10
|
||||||
20Test
|
20Test
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,5 @@
|
||||||
discard """
|
discard """
|
||||||
msg: '''int int
|
output: '''ok'''
|
||||||
float float
|
|
||||||
int int
|
|
||||||
TFoo TFoo
|
|
||||||
int float
|
|
||||||
TFoo TFoo'''
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import typetraits
|
import typetraits
|
||||||
|
|
@ -86,3 +81,4 @@ reject bindArg(int, int, 10, 20, 30, "test")
|
||||||
reject bindArg(int, string, 10.0, 20, "test", "nest")
|
reject bindArg(int, string, 10.0, 20, "test", "nest")
|
||||||
reject bindArg(int, string, "test", "nest", 10, 20)
|
reject bindArg(int, string, "test", "nest", 10, 20)
|
||||||
|
|
||||||
|
echo "ok"
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
discard """
|
discard """
|
||||||
msg: "static 10\ndynamic\nstatic 20\n"
|
nimout: "static 10\ndynamic\nstatic 20\n"
|
||||||
output: "s\nd\nd\ns"
|
output: "s\nd\nd\ns"
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
discard """
|
discard """
|
||||||
msg: '''letters
|
nimout: '''letters
|
||||||
aa
|
aa
|
||||||
bb
|
bb
|
||||||
numbers
|
numbers
|
||||||
|
|
@ -8,7 +8,7 @@ numbers
|
||||||
AST a
|
AST a
|
||||||
[(11, 22), (33, 44)]
|
[(11, 22), (33, 44)]
|
||||||
AST b
|
AST b
|
||||||
(e: [55, 66], f: [77, 88])
|
([55, 66], [77, 88])
|
||||||
55
|
55
|
||||||
10
|
10
|
||||||
20Test
|
20Test
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
discard """
|
discard """
|
||||||
msg: "int\nstring\nTBar[int]"
|
nimout: "int\nstring\nTBar[int]"
|
||||||
output: "int\nstring\nTBar[int]\nint\nrange 0..2(int)\nstring"
|
output: "int\nstring\nTBar[int]\nint\nrange 0..2(int)\nstring"
|
||||||
disabled: true
|
disabled: true
|
||||||
"""
|
"""
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
discard """
|
discard """
|
||||||
msg: "test 1\ntest 2\ntest 3"
|
nimout: "test 1\ntest 2\ntest 3"
|
||||||
output: "TEST 1\nTEST 2\nTEST 3"
|
output: "TEST 1\nTEST 2\nTEST 3"
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
discard """
|
discard """
|
||||||
cmd: "nim default $file"
|
cmd: "nim default $file"
|
||||||
output: '''hello world! 0.5'''
|
output: '''hello world! 0.5'''
|
||||||
msg: '''[NimScript] exec: gcc -v'''
|
nimout: '''[NimScript] exec: gcc -v'''
|
||||||
"""
|
"""
|
||||||
|
|
||||||
when not defined(definedefine):
|
when not defined(definedefine):
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
discard """
|
discard """
|
||||||
msg: "Warning: cannot prove that field 'x.s' is accessible [ProveField]"
|
nimout: "Warning: cannot prove that field 'x.s' is accessible [ProveField]"
|
||||||
line:51
|
line:51
|
||||||
action: run
|
action: run
|
||||||
output: "abc abc"
|
output: "abc abc"
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
discard """
|
discard """
|
||||||
disabled: "appveyor"
|
disabled: "windows"
|
||||||
"""
|
"""
|
||||||
|
|
||||||
# appveyor is "out of memory"
|
# appveyor is "out of memory"
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
discard """
|
discard """
|
||||||
msg: "instantiated for string\ninstantiated for int\ninstantiated for bool"
|
nimout: "instantiated for string\ninstantiated for int\ninstantiated for bool"
|
||||||
output: "int\nseq[string]\nA\nB\n100\ntrue"
|
output: "int\nseq[string]\nA\nB\n100\ntrue"
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
discard """
|
discard """
|
||||||
msg: '''true
|
nimout: '''true
|
||||||
true
|
true
|
||||||
true
|
true
|
||||||
true
|
true
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
discard """
|
discard """
|
||||||
msg: '''61'''
|
nimout: '''61'''
|
||||||
"""
|
"""
|
||||||
|
|
||||||
# bug #2297
|
# bug #2297
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
discard """
|
discard """
|
||||||
disabled: "appveyor"
|
disabled: "windows"
|
||||||
"""
|
"""
|
||||||
|
|
||||||
# If your os is windows and this test fails for you locally, please
|
# If your os is windows and this test fails for you locally, please
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
discard """
|
discard """
|
||||||
msg: '''Hello fred , managed by sally
|
nimout: '''Hello fred , managed by sally
|
||||||
Hello sally , managed by bob'''
|
Hello sally , managed by bob'''
|
||||||
"""
|
"""
|
||||||
# bug #3973
|
# bug #3973
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
discard """
|
discard """
|
||||||
msg: '''13'''
|
nimout: '''13'''
|
||||||
output: '''3
|
output: '''3
|
||||||
3
|
3
|
||||||
3'''
|
3'''
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
discard """
|
discard """
|
||||||
msg: "abc xyz bb"
|
nimout: "abc xyz bb"
|
||||||
"""
|
"""
|
||||||
|
|
||||||
# bug #2473
|
# bug #2473
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
discard """
|
discard """
|
||||||
msg: '''1
|
nimout: '''1
|
||||||
2
|
2
|
||||||
3
|
3
|
||||||
1
|
1
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
discard """
|
discard """
|
||||||
msg: '''
|
nimout: '''
|
||||||
x.data = @[10]
|
x.data = @[10]
|
||||||
y = @[11]
|
y = @[11]
|
||||||
x.data = @[11]
|
x.data = @[11]
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import macros
|
import macros
|
||||||
|
|
||||||
discard """
|
discard """
|
||||||
msg: '''
|
nimout: '''
|
||||||
8 9 17
|
8 9 17
|
||||||
239 255
|
239 255
|
||||||
61439 65534 65535
|
61439 65534 65535
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue