summary refs log tree commit diff stats
path: root/tests/toverflw.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/toverflw.nim')
-rwxr-xr-xtests/toverflw.nim15
1 files changed, 0 insertions, 15 deletions
diff --git a/tests/toverflw.nim b/tests/toverflw.nim
deleted file mode 100755
index c8f194e68..000000000
--- a/tests/toverflw.nim
+++ /dev/null
@@ -1,15 +0,0 @@
-# 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