diff options
Diffstat (limited to 'tests/macros')
-rw-r--r-- | tests/macros/tbindsym.nim | 2 | ||||
-rw-r--r-- | tests/macros/tdumpastgen.nim | 2 | ||||
-rw-r--r-- | tests/macros/tdumptree.nim | 9 | ||||
-rw-r--r-- | tests/macros/tgetimpl.nim | 2 | ||||
-rw-r--r-- | tests/macros/tmacrogenerics.nim | 8 | ||||
-rw-r--r-- | tests/macros/tmacros_issues.nim | 15 | ||||
-rw-r--r-- | tests/macros/tmacros_various.nim | 15 | ||||
-rw-r--r-- | tests/macros/tstaticparamsmacro.nim | 9 |
8 files changed, 34 insertions, 28 deletions
diff --git a/tests/macros/tbindsym.nim b/tests/macros/tbindsym.nim index 2abcd98ce..a493d6a88 100644 --- a/tests/macros/tbindsym.nim +++ b/tests/macros/tbindsym.nim @@ -1,5 +1,5 @@ discard """ - msg: '''initApple + nimout: '''initApple deinitApple Coral enum diff --git a/tests/macros/tdumpastgen.nim b/tests/macros/tdumpastgen.nim index 0a1836886..0e0581f6a 100644 --- a/tests/macros/tdumpastgen.nim +++ b/tests/macros/tdumpastgen.nim @@ -1,5 +1,5 @@ discard """ -msg: '''nnkStmtList.newTree( +nimout: '''nnkStmtList.newTree( nnkVarSection.newTree( nnkIdentDefs.newTree( newIdentNode("x"), diff --git a/tests/macros/tdumptree.nim b/tests/macros/tdumptree.nim index 58b011b45..f540306c4 100644 --- a/tests/macros/tdumptree.nim +++ b/tests/macros/tdumptree.nim @@ -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''' """ diff --git a/tests/macros/tgetimpl.nim b/tests/macros/tgetimpl.nim index aacfb703e..d231a4336 100644 --- a/tests/macros/tgetimpl.nim +++ b/tests/macros/tgetimpl.nim @@ -1,5 +1,5 @@ discard """ - msg: '''"muhaha" + nimout: '''"muhaha" proc poo(x, y: int) = let y = x echo ["poo"]''' diff --git a/tests/macros/tmacrogenerics.nim b/tests/macros/tmacrogenerics.nim index 919a15b46..e4acdc321 100644 --- a/tests/macros/tmacrogenerics.nim +++ b/tests/macros/tmacrogenerics.nim @@ -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" """ diff --git a/tests/macros/tmacros_issues.nim b/tests/macros/tmacros_issues.nim index ecdcd5da9..657f30fc4 100644 --- a/tests/macros/tmacros_issues.nim +++ b/tests/macros/tmacros_issues.nim @@ -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> """ diff --git a/tests/macros/tmacros_various.nim b/tests/macros/tmacros_various.nim index 15bd28a37..9eece00bd 100644 --- a/tests/macros/tmacros_various.nim +++ b/tests/macros/tmacros_various.nim @@ -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: ''' diff --git a/tests/macros/tstaticparamsmacro.nim b/tests/macros/tstaticparamsmacro.nim index ea59936e0..8bd653920 100644 --- a/tests/macros/tstaticparamsmacro.nim +++ b/tests/macros/tstaticparamsmacro.nim @@ -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) |