From 015dc329a9fc6aa2269a7810997cffb38b17edad Mon Sep 17 00:00:00 2001 From: Lucas Bajolet Date: Wed, 3 Jun 2015 11:38:50 -0400 Subject: [PATCH 1/1] tests: Updated test_float for new literals Signed-off-by: Lucas Bajolet --- tests/sav/test_float.res | 6 ++++++ tests/test_float.nit | 11 +++++++++++ 2 files changed, 17 insertions(+) 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 -- 1.7.9.5