summary refs log tree commit diff stats
path: root/tests/run/toverflw.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/run/toverflw.nim')
-rwxr-xr-xtests/run/toverflw.nim21
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

-
-