Add underflow/overflow tests.
This commit is contained in:
parent
b919ab790b
commit
52c6956d1a
6 changed files with 56 additions and 0 deletions
10
tests/vm/toverflowopcsubimmint.nim
Normal file
10
tests/vm/toverflowopcsubimmint.nim
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
discard """
|
||||
errormsg: "over- or underflow"
|
||||
"""
|
||||
|
||||
static:
|
||||
proc p =
|
||||
var x = int64.low
|
||||
discard x - 1
|
||||
assert false
|
||||
p()
|
||||
Loading…
Add table
Add a link
Reference in a new issue