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