start of tests refactoring; sqlite3 new wrapper fixes
This commit is contained in:
parent
6bc16904ed
commit
d913fdb280
173 changed files with 206 additions and 238 deletions
15
tests/accept/run/toverflw.nim
Normal file
15
tests/accept/run/toverflw.nim
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
# Tests emc's ability to detect overflows
|
||||
|
||||
{.push overflowChecks: on.}
|
||||
|
||||
var
|
||||
a, b: int
|
||||
a = high(int)
|
||||
b = -2
|
||||
try:
|
||||
writeln(stdout, b - a)
|
||||
except EOverflow:
|
||||
writeln(stdout, "the computation overflowed")
|
||||
|
||||
{.pop.} # overflow check
|
||||
#OUT the computation overflowed
|
||||
Loading…
Add table
Add a link
Reference in a new issue