changeset 122:2d6556f72afb

float tests
author Anders Halager <halager@gmail.com>
date Sun, 25 May 2008 21:03:06 +0200
parents 95dfe2f48dcf
children aa3bb5d8ba0c
files tests/code/float_1.d tests/code/float_2.d
diffstat 2 files changed, 19 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/code/float_1.d	Sun May 25 21:03:06 2008 +0200
@@ -0,0 +1,11 @@
+int main()
+{
+    float a = 1.0 + 1;
+    double b = a + 1.0 + 2;
+    real c = b + a + 1e300;
+    c = c * a + a;
+    return c != f();
+}
+
+real f();
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/code/float_2.d	Sun May 25 21:03:06 2008 +0200
@@ -0,0 +1,8 @@
+int main()
+{
+    float a = 1.0 + 1;
+    double b = a + 1.0 + 2;
+    b = 1 + a;
+    return 0;
+}
+