diff options
Diffstat (limited to 'tests/run/toverflw.nim')
-rwxr-xr-x | tests/run/toverflw.nim | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/tests/run/toverflw.nim b/tests/run/toverflw.nim deleted file mode 100755 index cd7b65acf..000000000 --- a/tests/run/toverflw.nim +++ /dev/null @@ -1,21 +0,0 @@ -discard """ - file: "toverflw.nim" - output: "the computation overflowed" -""" -# Tests nimrod'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 - - |