From 562d185cb73fa31d901685a15e92b8904f9b077b Mon Sep 17 00:00:00 2001 From: Araq Date: Fri, 23 Nov 2018 13:16:45 +0100 Subject: [PATCH] cleanup tests; don't use non-working 'msg' spec field --- tests/concepts/tconcepts_issues.nim | 1 - tests/concepts/tmapconcept.nim | 2 +- tests/concepts/tmatrixconcept.nim | 2 +- tests/concepts/tstackconcept.nim | 2 +- tests/generics/tlateboundstatic.nim | 2 +- tests/macros/tbindsym.nim | 2 +- tests/macros/tdumpastgen.nim | 2 +- tests/macros/tdumptree.nim | 9 +++++---- tests/macros/tgetimpl.nim | 2 +- tests/macros/tmacrogenerics.nim | 8 +++++--- tests/macros/tmacros_issues.nim | 15 ++++++--------- tests/macros/tmacros_various.nim | 15 ++++++++++----- tests/macros/tstaticparamsmacro.nim | 9 +++++---- tests/metatype/tbindtypedesc.nim | 8 ++------ tests/metatype/tsemistatic.nim | 2 +- tests/metatype/tstaticparammacro.nim | 8 ++++---- tests/metatype/ttypetraits.nim | 2 +- tests/misc/tmemoization.nim | 2 +- tests/newconfig/tfoo.nim | 2 +- tests/objvariant/tcheckedfield1.nim | 2 +- tests/system/talloc2.nim | 2 +- tests/typerel/trettypeinference.nim | 2 +- tests/types/taliasbugs.nim | 2 +- tests/vm/tconsttable2.nim | 2 +- tests/vm/tgorge.nim | 2 +- tests/vm/tinheritance.nim | 2 +- tests/vm/tmitems.nim | 2 +- tests/vm/tsimpleglobals.nim | 2 +- tests/vm/tstaticprintseq.nim | 2 +- tests/vm/tswap.nim | 2 +- tests/vm/ttouintconv.nim | 2 +- 31 files changed, 60 insertions(+), 59 deletions(-) diff --git a/tests/concepts/tconcepts_issues.nim b/tests/concepts/tconcepts_issues.nim index e145b9f373..df4037ffb8 100644 --- a/tests/concepts/tconcepts_issues.nim +++ b/tests/concepts/tconcepts_issues.nim @@ -1,5 +1,4 @@ discard """ - file: "tissues.nim" output: ''' 20.0 USD Printable diff --git a/tests/concepts/tmapconcept.nim b/tests/concepts/tmapconcept.nim index 5082fcb61e..6b959eff24 100644 --- a/tests/concepts/tmapconcept.nim +++ b/tests/concepts/tmapconcept.nim @@ -3,7 +3,7 @@ output: '''10 10 1''' -msg: ''' +nimout: ''' K=string V=int K=int64 V=string K=int V=int diff --git a/tests/concepts/tmatrixconcept.nim b/tests/concepts/tmatrixconcept.nim index dd5a080b6d..ca31f59427 100644 --- a/tests/concepts/tmatrixconcept.nim +++ b/tests/concepts/tmatrixconcept.nim @@ -1,6 +1,6 @@ discard """ output: "0\n0\n0" -msg: ''' +nimout: ''' R=3 C=3 TE=9 FF=14 FC=20 T=int R=3 C=3 T=int ''' diff --git a/tests/concepts/tstackconcept.nim b/tests/concepts/tstackconcept.nim index cb8db566d8..fb6032732f 100644 --- a/tests/concepts/tstackconcept.nim +++ b/tests/concepts/tstackconcept.nim @@ -1,6 +1,6 @@ discard """ output: "20\n10" -msg: ''' +nimout: ''' INFERRED int VALUE TYPE int VALUE TYPE NAME INT diff --git a/tests/generics/tlateboundstatic.nim b/tests/generics/tlateboundstatic.nim index f68f95f8d9..90b44aa8ee 100644 --- a/tests/generics/tlateboundstatic.nim +++ b/tests/generics/tlateboundstatic.nim @@ -1,5 +1,5 @@ discard """ - msg: "array[0..3, int]" + nimout: "array[0..3, int]" """ type diff --git a/tests/macros/tbindsym.nim b/tests/macros/tbindsym.nim index 2abcd98ce2..a493d6a887 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 0a18368868..0e0581f6ad 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 58b011b459..f540306c43 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 aacfb703e8..d231a4336a 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 919a15b46c..e4acdc3217 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 ecdcd5da91..657f30fc48 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"""

Test!

""" - proc another: string = tmpli html""" + proc another: string {.used.} = tmpli html"""

what

""" diff --git a/tests/macros/tmacros_various.nim b/tests/macros/tmacros_various.nim index 15bd28a37d..9eece00bda 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 ea59936e08..8bd6539209 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) diff --git a/tests/metatype/tbindtypedesc.nim b/tests/metatype/tbindtypedesc.nim index 039acfbe9e..cfa80e5814 100644 --- a/tests/metatype/tbindtypedesc.nim +++ b/tests/metatype/tbindtypedesc.nim @@ -1,10 +1,5 @@ discard """ - msg: '''int int -float float -int int -TFoo TFoo -int float -TFoo TFoo''' + output: '''ok''' """ 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, "test", "nest", 10, 20) +echo "ok" diff --git a/tests/metatype/tsemistatic.nim b/tests/metatype/tsemistatic.nim index 3f36abde95..56b9a62186 100644 --- a/tests/metatype/tsemistatic.nim +++ b/tests/metatype/tsemistatic.nim @@ -1,5 +1,5 @@ discard """ - msg: "static 10\ndynamic\nstatic 20\n" + nimout: "static 10\ndynamic\nstatic 20\n" output: "s\nd\nd\ns" """ diff --git a/tests/metatype/tstaticparammacro.nim b/tests/metatype/tstaticparammacro.nim index 02021185f8..16a6e56b80 100644 --- a/tests/metatype/tstaticparammacro.nim +++ b/tests/metatype/tstaticparammacro.nim @@ -1,5 +1,5 @@ discard """ - msg: '''letters + nimout: '''letters aa bb numbers @@ -8,7 +8,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 +44,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) diff --git a/tests/metatype/ttypetraits.nim b/tests/metatype/ttypetraits.nim index 1062578282..2765a42319 100644 --- a/tests/metatype/ttypetraits.nim +++ b/tests/metatype/ttypetraits.nim @@ -1,5 +1,5 @@ discard """ - msg: "int\nstring\nTBar[int]" + nimout: "int\nstring\nTBar[int]" output: "int\nstring\nTBar[int]\nint\nrange 0..2(int)\nstring" disabled: true """ diff --git a/tests/misc/tmemoization.nim b/tests/misc/tmemoization.nim index 840eb3b0d7..c656926083 100644 --- a/tests/misc/tmemoization.nim +++ b/tests/misc/tmemoization.nim @@ -1,5 +1,5 @@ discard """ - msg: "test 1\ntest 2\ntest 3" + nimout: "test 1\ntest 2\ntest 3" output: "TEST 1\nTEST 2\nTEST 3" """ diff --git a/tests/newconfig/tfoo.nim b/tests/newconfig/tfoo.nim index 52ea841ee7..f332cd6d4e 100644 --- a/tests/newconfig/tfoo.nim +++ b/tests/newconfig/tfoo.nim @@ -1,7 +1,7 @@ discard """ cmd: "nim default $file" output: '''hello world! 0.5''' - msg: '''[NimScript] exec: gcc -v''' + nimout: '''[NimScript] exec: gcc -v''' """ when not defined(definedefine): diff --git a/tests/objvariant/tcheckedfield1.nim b/tests/objvariant/tcheckedfield1.nim index d6ae0ad51a..69b099f24d 100644 --- a/tests/objvariant/tcheckedfield1.nim +++ b/tests/objvariant/tcheckedfield1.nim @@ -1,5 +1,5 @@ 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 action: run output: "abc abc" diff --git a/tests/system/talloc2.nim b/tests/system/talloc2.nim index 6b30a02580..e40c3f93ca 100644 --- a/tests/system/talloc2.nim +++ b/tests/system/talloc2.nim @@ -1,5 +1,5 @@ discard """ -disabled: "appveyor" +disabled: "windows" """ # appveyor is "out of memory" diff --git a/tests/typerel/trettypeinference.nim b/tests/typerel/trettypeinference.nim index fa4e89cc8d..aa0d66e5bb 100644 --- a/tests/typerel/trettypeinference.nim +++ b/tests/typerel/trettypeinference.nim @@ -1,5 +1,5 @@ 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" """ diff --git a/tests/types/taliasbugs.nim b/tests/types/taliasbugs.nim index bdb2a7a32c..f1b35edf61 100644 --- a/tests/types/taliasbugs.nim +++ b/tests/types/taliasbugs.nim @@ -1,5 +1,5 @@ discard """ - msg: '''true + nimout: '''true true true true diff --git a/tests/vm/tconsttable2.nim b/tests/vm/tconsttable2.nim index e07734eb5b..5a392fb663 100644 --- a/tests/vm/tconsttable2.nim +++ b/tests/vm/tconsttable2.nim @@ -1,5 +1,5 @@ discard """ - msg: '''61''' + nimout: '''61''' """ # bug #2297 diff --git a/tests/vm/tgorge.nim b/tests/vm/tgorge.nim index a20de6024a..11c49a4cc2 100644 --- a/tests/vm/tgorge.nim +++ b/tests/vm/tgorge.nim @@ -1,5 +1,5 @@ discard """ -disabled: "appveyor" +disabled: "windows" """ # If your os is windows and this test fails for you locally, please diff --git a/tests/vm/tinheritance.nim b/tests/vm/tinheritance.nim index 2c224abcb3..a94ccafcdd 100644 --- a/tests/vm/tinheritance.nim +++ b/tests/vm/tinheritance.nim @@ -1,5 +1,5 @@ discard """ - msg: '''Hello fred , managed by sally + nimout: '''Hello fred , managed by sally Hello sally , managed by bob''' """ # bug #3973 diff --git a/tests/vm/tmitems.nim b/tests/vm/tmitems.nim index a0e64d6aa2..87835d1cd1 100644 --- a/tests/vm/tmitems.nim +++ b/tests/vm/tmitems.nim @@ -1,5 +1,5 @@ discard """ - msg: '''13''' + nimout: '''13''' output: '''3 3 3''' diff --git a/tests/vm/tsimpleglobals.nim b/tests/vm/tsimpleglobals.nim index 27bfdce502..7ab665070e 100644 --- a/tests/vm/tsimpleglobals.nim +++ b/tests/vm/tsimpleglobals.nim @@ -1,5 +1,5 @@ discard """ - msg: "abc xyz bb" + nimout: "abc xyz bb" """ # bug #2473 diff --git a/tests/vm/tstaticprintseq.nim b/tests/vm/tstaticprintseq.nim index 246a0211bf..37bf622463 100644 --- a/tests/vm/tstaticprintseq.nim +++ b/tests/vm/tstaticprintseq.nim @@ -1,5 +1,5 @@ discard """ - msg: '''1 + nimout: '''1 2 3 1 diff --git a/tests/vm/tswap.nim b/tests/vm/tswap.nim index 2219be9cae..4243b5a715 100644 --- a/tests/vm/tswap.nim +++ b/tests/vm/tswap.nim @@ -1,5 +1,5 @@ discard """ -msg: ''' +nimout: ''' x.data = @[10] y = @[11] x.data = @[11] diff --git a/tests/vm/ttouintconv.nim b/tests/vm/ttouintconv.nim index 5f8884e80a..dd4c597bad 100644 --- a/tests/vm/ttouintconv.nim +++ b/tests/vm/ttouintconv.nim @@ -1,7 +1,7 @@ import macros discard """ -msg: ''' +nimout: ''' 8 9 17 239 255 61439 65534 65535