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,5 @@
|
|||
discard """
|
||||
msg: '''initApple
|
||||
nimout: '''initApple
|
||||
deinitApple
|
||||
Coral
|
||||
enum
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
discard """
|
||||
msg: '''nnkStmtList.newTree(
|
||||
nimout: '''nnkStmtList.newTree(
|
||||
nnkVarSection.newTree(
|
||||
nnkIdentDefs.newTree(
|
||||
newIdentNode("x"),
|
||||
|
|
|
|||
|
|
@ -1,13 +1,14 @@
|
|||
discard """
|
||||
msg: '''StmtList
|
||||
nimout: '''
|
||||
StmtList
|
||||
VarSection
|
||||
IdentDefs
|
||||
Ident !"x"
|
||||
Ident "x"
|
||||
Empty
|
||||
Call
|
||||
DotExpr
|
||||
Ident !"foo"
|
||||
Ident !"create"
|
||||
Ident "foo"
|
||||
Ident "create"
|
||||
IntLit 56'''
|
||||
"""
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
discard """
|
||||
msg: '''"muhaha"
|
||||
nimout: '''"muhaha"
|
||||
proc poo(x, y: int) =
|
||||
let y = x
|
||||
echo ["poo"]'''
|
||||
|
|
|
|||
|
|
@ -1,8 +1,10 @@
|
|||
discard """
|
||||
file: "tmacrogenerics.nim"
|
||||
msg: '''
|
||||
instantiation 1 with typedesc and typedesc
|
||||
counter: 1
|
||||
nimout: '''
|
||||
instantiation 1 with None and None
|
||||
instantiation 2 with None and None
|
||||
instantiation 3 with None and None
|
||||
counter: 3
|
||||
'''
|
||||
output: "int\nfloat\nint\nstring"
|
||||
"""
|
||||
|
|
|
|||
|
|
@ -1,13 +1,10 @@
|
|||
discard """
|
||||
msg: '''
|
||||
proc init(foo129050: int; bar129052: typedesc[int]): int =
|
||||
foo129050
|
||||
|
||||
nimout: '''
|
||||
IntLit 5
|
||||
proc (x: int): string => typeDesc[proc[string, int]]
|
||||
proc (x: int): void => typeDesc[proc[void, int]]
|
||||
proc (x: int) => typeDesc[proc[void, int]]
|
||||
x => uncheckedArray[int]
|
||||
x => UncheckedArray[int]
|
||||
a
|
||||
s
|
||||
d
|
||||
|
|
@ -43,8 +40,8 @@ block t7723:
|
|||
proc init(foo: int, bar: typedesc[int]): int =
|
||||
foo
|
||||
|
||||
expandMacros:
|
||||
foo1()
|
||||
#expandMacros:
|
||||
foo1()
|
||||
|
||||
doAssert init(1, int) == 1
|
||||
|
||||
|
|
@ -144,11 +141,11 @@ block t1140:
|
|||
result.parse_template body[1].strVal
|
||||
|
||||
|
||||
proc actual: string = tmpli html"""
|
||||
proc actual: string {.used.} = tmpli html"""
|
||||
<p>Test!</p>
|
||||
"""
|
||||
|
||||
proc another: string = tmpli html"""
|
||||
proc another: string {.used.} = tmpli html"""
|
||||
<p>what</p>
|
||||
"""
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,14 @@
|
|||
discard """
|
||||
msg: '''
|
||||
range[0 .. 100]
|
||||
array[0 .. 100, int]
|
||||
10
|
||||
test
|
||||
nimout: '''
|
||||
Infix
|
||||
Ident "=>"
|
||||
Call
|
||||
Ident "name"
|
||||
Ident "a"
|
||||
ExprColonExpr
|
||||
Ident "b"
|
||||
Ident "cint"
|
||||
NilLit
|
||||
'''
|
||||
|
||||
output: '''
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
discard """
|
||||
msg: '''letters
|
||||
nimout: '''
|
||||
letters
|
||||
aa
|
||||
bb
|
||||
numbers
|
||||
|
|
@ -8,7 +9,7 @@ numbers
|
|||
AST a
|
||||
[(11, 22), (33, 44)]
|
||||
AST b
|
||||
(e: [55, 66], f: [77, 88])
|
||||
([55, 66], [77, 88])
|
||||
55
|
||||
10
|
||||
20Test
|
||||
|
|
@ -44,10 +45,10 @@ const
|
|||
b : Tb = (@[55,66], @[77, 88])
|
||||
|
||||
macro mA(data: static[Ta]): untyped =
|
||||
echo "AST a \n", repr(data)
|
||||
echo "AST a\n", repr(data)
|
||||
|
||||
macro mB(data: static[Tb]): untyped =
|
||||
echo "AST b \n", repr(data)
|
||||
echo "AST b\n", repr(data)
|
||||
echo data.e[0]
|
||||
|
||||
mA(a)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue