remove some noises in tests (#16448)

This commit is contained in:
flywind 2020-12-27 07:45:57 -06:00 • committed by GitHub
commit 271f68259b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 140 additions and 181 deletions

View file

@ -3,11 +3,11 @@ import unittest
template t(a: int): string = "int"
template t(a: string): string = "string"
test "templates can be overloaded":
block: # templates can be overloaded
check t(10) == "int"
check t("test") == "string"
test "previous definitions can be further overloaded or hidden in local scopes":
block: # previous definitions can be further overloaded or hidden in local scopes
template t(a: bool): string = "bool"
check t(true) == "bool"
@ -17,7 +17,7 @@ test "previous definitions can be further overloaded or hidden in local scopes":
check t(10) == "inner int"
check t("test") == "string"
test "templates can be redefined multiple times":
block: # templates can be redefined multiple times
template customAssert(cond: bool, msg: string): typed {.dirty.} =
if not cond: fail(msg)