summary refs log tree commit diff stats
path: root/tests/overflw/toverflw.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/overflw/toverflw.nim')
-rw-r--r--tests/overflw/toverflw.nim21
1 files changed, 0 insertions, 21 deletions
diff --git a/tests/overflw/toverflw.nim b/tests/overflw/toverflw.nim
deleted file mode 100644
index 771a43303..000000000
--- a/tests/overflw/toverflw.nim
+++ /dev/null
@@ -1,21 +0,0 @@
-discard """
-  file: "toverflw.nim"
-  output: "the computation overflowed"
-"""
-# Tests nim's ability to detect overflows
-
-{.push overflowChecks: on.}
-
-var
-  a, b: int
-a = high(int)
-b = -2
-try:
-  writeLine(stdout, b - a)
-except OverflowError:
-  writeLine(stdout, "the computation overflowed")
-
-{.pop.} # overflow check
-#OUT the computation overflowed
-
-