From: Lucas Bajolet Date: Wed, 3 Jun 2015 15:38:50 +0000 (-0400) Subject: tests: Updated test_float for new literals X-Git-Tag: v0.7.6~65^2 X-Git-Url: http://nitlanguage.org tests: Updated test_float for new literals Signed-off-by: Lucas Bajolet --- diff --git a/tests/sav/test_float.res b/tests/sav/test_float.res index cd932ee..feaed3f 100644 --- a/tests/sav/test_float.res +++ b/tests/sav/test_float.res @@ -5,3 +5,9 @@ 12.346 12.3 12 +0.5 +0.000 +0.000003125 +3410.0 +400.0 +10.0 diff --git a/tests/test_float.nit b/tests/test_float.nit index 387c312..a997f01 100644 --- a/tests/test_float.nit +++ b/tests/test_float.nit @@ -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