forked from nim-works/nimskull
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests: enable the
exceptions
category for all targets (nim-works#1082)
## Summary Clean up the category and enable it for all targets by default. This significantly increases test coverage of exceptions for the JS and VM targets. ## Details **General changes/cleanup:** * references to issues like `nim-works#1234` are replaced with proper GitHub links * the `targets` key is removed for tests that should be run on all targets * usage of `cmd` is replaced with usage of `matrix` (allowing for multi-target testing) * `write(stdout, ...)` is replaced with `echo` in order to support the JS and VM targets * execution of `static:` blocks is replaced with using the VM target, when the test is not specific to compile-time execution * tests that don't work but should are marked as `knownIssue` **Specific changes:** * where not necessary for the test, `getCurrentExceptionMsg` is replaced with `getCurrentException().msg`, as the former is not yet supported by the VM * `texceptions2.nim` is removed -- it's redundant with `texception.nim` * `texception_message_null_byte.nim` is turned into a normal test that doesn't rely on self-execution
- Loading branch information
Showing
22 changed files
with
59 additions
and
211 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,13 @@ | ||
discard """ | ||
action: compile | ||
target: "vm" | ||
description: '''An empty exception name is overridden on raise when run in | ||
the VM''' | ||
knownIssue | ||
""" | ||
|
||
# The VM treats `cstring(nil)` and `cstring("")` as the same thing | ||
|
||
static: | ||
try: | ||
raise (ref CatchableError)(name: "") | ||
except CatchableError as e: | ||
doAssert e.name == "" | ||
try: | ||
raise (ref CatchableError)(name: "") | ||
except CatchableError as e: | ||
doAssert e.name == "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.