diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2021-09-02 12:10:14 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-02 12:10:14 +0200 |
commit | e0ef859130f429df1891e31a85955daa753346b4 (patch) | |
tree | 49c680c4e93a321a319e38168dd14483c2a9b71e /tests/stdlib/tstdlib_various.nim | |
parent | 72fa5833adac590e3c78e2b774cd33f28827594b (diff) | |
download | Nim-e0ef859130f429df1891e31a85955daa753346b4.tar.gz |
strict effects (#18777)
* fixes #17369 * megatest is green for --cpu:arm64 * docgen output includes more tags/raises * implemented 'effectsOf' * algorithm.nim: uses new effectsOf annotation * closes #18376 * closes #17475 * closes #13905 * allow effectsOf: [a, b] * added a test case * parameters that are not ours cannot be declared as .effectsOf * documentation * manual: added the 'sort' example * bootstrap with the new better options
Diffstat (limited to 'tests/stdlib/tstdlib_various.nim')
-rw-r--r-- | tests/stdlib/tstdlib_various.nim | 31 |
1 files changed, 14 insertions, 17 deletions
diff --git a/tests/stdlib/tstdlib_various.nim b/tests/stdlib/tstdlib_various.nim index b153fd2ba..bc90d6ef4 100644 --- a/tests/stdlib/tstdlib_various.nim +++ b/tests/stdlib/tstdlib_various.nim @@ -20,12 +20,6 @@ Hi Andreas! How do you feel, Rumpf? @[0, 2, 1] @[0, 1, 2] 055this should be the casehugh@["(", "+", " 1", " 2", ")"] -caught a crash! -caught a crash! -caught a crash! -caught a crash! -caught a crash! -caught a crash! [5] [4, 5] [3, 4, 5] @@ -161,18 +155,21 @@ block tropes: block tsegfaults: - proc main = - try: - var x: ptr int - echo x[] + when not defined(arm64): + var crashes = 0 + proc main = try: - raise newException(ValueError, "not a crash") - except ValueError: - discard - except NilAccessDefect: - echo "caught a crash!" - for i in 0..5: - main() + var x: ptr int + echo x[] + try: + raise newException(ValueError, "not a crash") + except ValueError: + discard + except NilAccessDefect: + inc crashes + for i in 0..5: + main() + assert crashes == 6 |