floating point checks

This commit is contained in:
Andreas Rumpf 2009-12-14 01:38:05 +01:00
commit 3b7ef2288f
30 changed files with 611 additions and 631 deletions

1
tests/99bottles.nim Executable file
View file

@ -0,0 +1 @@
# Test if the compiler detects invalid module names

8
tests/tfloat1.nim Executable file
View file

@ -0,0 +1,8 @@
# 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 [EFloatOverflow]

8
tests/tfloat2.nim Executable file
View file

@ -0,0 +1,8 @@
# 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]