make run the default action of a test in tester

This commit is contained in:
Arne Döring 2018-11-13 15:21:14 +01:00 • committed by Araq
commit 031bfdec6f
50 changed files with 313 additions and 46 deletions

View file

@ -1,6 +1,8 @@
discard """
msg: '''ObjectTy(Sym(Model), RecList(Sym(name), Sym(password)))
BracketExpr(Sym(typeDesc), Sym(User))'''
output: '''
(ObjectTy (Empty) (Sym "Model") (RecList (Sym "name") (Sym "password")))
(BracketExpr (Sym "typeDesc") (Sym "User"))
'''
"""
import strutils, macros

View file

@ -1,3 +1,35 @@
discard """
output: '''
############
#### gt ####
############
gt(Foo): typeDesc[Foo]
gt(Bar): typeDesc[Bar]
gt(Baz): typeDesc[int]
gt(foo): distinct[int]
gt(bar): distinct[int]
gt(baz): int, int
gt(v): seq[int]
gt(vv): seq[float]
gt(t): distinct[tuple[int, int]]
gt(tt): distinct[tuple[float, float]]
gt(s): distinct[tuple[int, int]]
#############
#### gt2 ####
#############
gt2(Foo): Foo
gt2(Bar): Bar
gt2(Baz): Baz
gt2(foo): Foo
gt2(bar): Bar
gt2(baz): Baz
gt2(v): seq[int]
gt2(vv): seq[float]
gt2(t): MyType[system.int]
gt2(tt): MyType[system.float]
gt2(s): MySimpleType
'''
"""
import macros, typetraits

View file

@ -1,3 +1,11 @@
discard """
output: '''
123
Hallo Welt
Hallo Welt
'''
"""
import macros
macro mac(): untyped =