tests: Updated test_float for new literals
authorLucas Bajolet <r4pass@hotmail.com>
Wed, 3 Jun 2015 15:38:50 +0000 (11:38 -0400)
committerLucas Bajolet <r4pass@hotmail.com>
Wed, 3 Jun 2015 15:38:50 +0000 (11:38 -0400)
Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>

tests/sav/test_float.res
tests/test_float.nit

index cd932ee..feaed3f 100644 (file)
@@ -5,3 +5,9 @@
 12.346
 12.3
 12
+0.5
+0.000
+0.000003125
+3410.0
+400.0
+10.0
index 387c312..a997f01 100644 (file)
@@ -23,3 +23,14 @@ print(f.to_s)
 print(f.to_precision(3))
 print(f.to_precision(1))
 print(f.to_precision(0))
+f = 5.0e-1
+print(f)
+f = 3.125e-6
+print(f.to_precision(3))
+print(f.to_precision(9))
+f = 3.41e3
+print f
+f = 4e2
+print f
+f = .1e2
+print f