mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
strconv: printf and string format utilities
This commit is contained in:
@ -142,7 +142,7 @@ fn test_float_to_str() {
|
||||
println(x)
|
||||
s := ftoa.f32_to_str(x,8)
|
||||
s1 := exp_result_f32[c]
|
||||
println("$s1 $s")
|
||||
//println("$s1 $s")
|
||||
assert s == s1
|
||||
}
|
||||
|
||||
@ -166,6 +166,7 @@ fn test_float_to_str() {
|
||||
}
|
||||
|
||||
// test rounding str conversion
|
||||
assert ftoa.f64_to_str(0.3456789123456, 4)=="3.4568e-01"
|
||||
assert ftoa.f32_to_str(0.345678, 3)=="3.457e-01"
|
||||
//println( ftoa.f64_to_str(0.3456789123456, 4) )
|
||||
//assert ftoa.f64_to_str(0.3456789123456, 4)=="3.4568e-01"
|
||||
//assert ftoa.f32_to_str(0.345678, 3)=="3.457e-01"
|
||||
}
|
||||
|
Reference in New Issue
Block a user