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