diff options
Diffstat (limited to 'tests/float/tfloat2.nim')
-rw-r--r-- | tests/float/tfloat2.nim | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/float/tfloat2.nim b/tests/float/tfloat2.nim new file mode 100644 index 000000000..51883674f --- /dev/null +++ b/tests/float/tfloat2.nim @@ -0,0 +1,15 @@ +discard """ + file: "tfloat2.nim" + outputsub: "Error: unhandled exception: FPU operation caused a NaN result [EFloatInvalidOp]" + 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 [EFloatInvalidOp] + + |