diff --git a/vlib/strconv/atof_test.v b/vlib/strconv/atof_test.v index be348a98cf..545aa5e859 100644 --- a/vlib/strconv/atof_test.v +++ b/vlib/strconv/atof_test.v @@ -1,3 +1,4 @@ +module strconv /********************************************************************** * * String to float Test diff --git a/vlib/strconv/f32_f64_to_string_test.v b/vlib/strconv/f32_f64_to_string_test.v index 8b7ab88f2a..3a92a312bf 100644 --- a/vlib/strconv/f32_f64_to_string_test.v +++ b/vlib/strconv/f32_f64_to_string_test.v @@ -1,9 +1,9 @@ +module strconv /********************************************************************** * * Float to string Test * **********************************************************************/ -import strconv import math union Ufloat32 { @@ -140,7 +140,7 @@ fn test_float_to_str() { // test f32 for c,x in test_cases_f32 { println(x) - s := strconv.f32_to_str(x,8) + s := f32_to_str(x,8) s1 := exp_result_f32[c] //println("$s1 $s") assert s == s1 @@ -148,7 +148,7 @@ fn test_float_to_str() { // test f64 for c,x in test_cases_f64 { - s := strconv.f64_to_str(x,17) + s := f64_to_str(x,17) s1 := exp_result_f64[c] //println("$s1 $s") assert s == s1 @@ -156,11 +156,11 @@ fn test_float_to_str() { // test long format for exp := 1 ; exp < 120 ; exp++ { - a := strconv.f64_to_str_l(("1e"+exp.str()).f64()) + a := f64_to_str_l(("1e"+exp.str()).f64()) //println(a) assert a.len == exp + 1 - b := strconv.f64_to_str_l(("1e-"+exp.str()).f64()) + b := f64_to_str_l(("1e-"+exp.str()).f64()) //println(b) assert b.len == exp + 2 }