use -r:off for runnableExamples that should compile but not run (#17203)

* use -r:off for runnableExamples that should compile but not run

* use -r:off in other RT disabled tests
This commit is contained in:
Timothee Cour 2021-03-01 05:26:39 -08:00 • committed by GitHub
commit dd6b0f81ef
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 38 additions and 42 deletions

View file

@ -168,11 +168,11 @@ macro dump*(x: untyped): untyped =
## See also: `dumpToString` which is more convenient and useful since
## it expands intermediate templates/macros, returns a string instead of
## calling `echo`, and works with statements and expressions.
runnableExamples:
runnableExamples("-r:off"):
let
x = 10
y = 20
if false: dump(x + y) # if true would print `x + y = 30`
dump(x + y) # prints: `x + y = 30`
let s = x.toStrLit
result = quote do: