Skip to content

Improve documentation for assertions #16988

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Feb 11, 2021
Merged

Conversation

konsumlamm
Copy link
Contributor

Refs #3543.

@konsumlamm
Copy link
Contributor Author

The CI failure seems to be caused by tests/assert/tassert_c.nim more or less hardcoding the expected stack trace...

@timotheecour
Copy link
Member

The CI failure seems to be caused by tests/assert/tassert_c.nim more or less hardcoding the expected stack trace...

change tests/assert/tassert_c.nim code to:

const expected = """
tassert_c.nim(35)        tassert_c
tassert_c.nim(34)        foo
assertions.nim(*)       failedAssertImpl
assertions.nim(*)       raiseAssert
fatal.nim(*)            sysFatal"""

(it works, i checked)

if other files hardcode this, move tmatch to testament/lib/stdtest/testutils.nim so can be reused

Fix tests/assert/tassert_c.nim
@timotheecour
Copy link
Member

@konsumlamm CI fails because of #16993, how about simply as workaround move the runnableExamples to module scope.

@Araq Araq merged commit d4f7f1d into nim-lang:devel Feb 11, 2021
@konsumlamm konsumlamm deleted the assertions branch February 14, 2021 14:39
ardek66 pushed a commit to ardek66/Nim that referenced this pull request Mar 26, 2021
* Improve documentation for assertions

* Apply suggestions

Fix tests/assert/tassert_c.nim

* Use runnableExamples

* Move runnableExamples to module scope
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants