Improve documentation for assertions (#16988)

* Improve documentation for assertions

* Apply suggestions

Fix tests/assert/tassert_c.nim

* Use runnableExamples

* Move runnableExamples to module scope
This commit is contained in:
konsumlamm 2021-02-11 07:21:27 +01:00 • committed by GitHub
commit d4f7f1d8f3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 54 additions and 38 deletions

View file

@ -6,9 +6,9 @@ discard """
const expected = """
tassert_c.nim(35) tassert_c
tassert_c.nim(34) foo
assertions.nim(30) failedAssertImpl
assertions.nim(23) raiseAssert
fatal.nim(53) sysFatal"""
assertions.nim(*) failedAssertImpl
assertions.nim(*) raiseAssert
fatal.nim(*) sysFatal"""
proc tmatch(x, p: string): bool =
var i = 0