make testament isSuccess more robust and allow tests with --hints:off to succeed (#17968)

* fix testament isSuccess

* show givenSpec in addResult

* simplify tstatictypes.nim
This commit is contained in:
Timothee Cour 2021-05-10 21:54:52 -07:00 • committed by GitHub
commit f68f28d157
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 35 additions and 11 deletions

View file

@ -11,7 +11,6 @@ staticAlialProc instantiated with 368
1: Bar
0: Foo
1: Bar
Hint: ***SLOW, DEBUG BUILD***; -d:release makes code run faster. [BuildMode]
'''
output: '''
16
@ -23,11 +22,9 @@ heyho
Val1
Val1
'''
matrix: "--hint:XDeclaredButNotUsed:off --hint:cc:off --hint:link:off --hint:SuccessX:off --hint:conf:off"
matrix: "--hints:off"
"""
# pending https://github.com/nim-lang/Nim/pull/17852 use `--hints:none --hint:SuccessX:off`, or improve `isSuccess`
import macros
template ok(x) = doAssert(x)