summary refs log tree commit diff stats
path: root/tests/float/tfloat1.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/float/tfloat1.nim')
-rw-r--r--tests/float/tfloat1.nim12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/float/tfloat1.nim b/tests/float/tfloat1.nim
new file mode 100644
index 000000000..d3497f24c
--- /dev/null
+++ b/tests/float/tfloat1.nim
@@ -0,0 +1,12 @@
+discard """
+  outputsub: "Error: unhandled exception: FPU operation caused an overflow [FloatOverflowDefect]"
+  exitcode: "1"
+"""
+# Test new floating point exceptions
+
+{.floatChecks: on.}
+
+var x = 0.8
+var y = 0.0
+
+echo x / y #OUT Error: unhandled exception: FPU operation caused an overflow