1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

strconv: use import instead of module in test files (#5856)

This commit is contained in:
Ryan Willis
2020-07-16 17:35:42 -07:00
committed by GitHub
parent 69ef43ba00
commit 82e2b1ec33
3 changed files with 12 additions and 12 deletions

View File

@ -1,4 +1,4 @@
module strconv
import strconv
/**********************************************************************
*
* String to float Test
@ -35,11 +35,11 @@ fn test_atof() {
// check conversion case 1 string <=> string
for c,x in src_num {
// slow atof
assert atof64(src_num_str[c]).strlong() == x.strlong()
assert strconv.atof64(src_num_str[c]).strlong() == x.strlong()
// quick atof
mut s1 := (atof_quick(src_num_str[c]).str())
mut s1 := (strconv.atof_quick(src_num_str[c]).str())
mut s2 := (x.str())
delta := s1.f64() - s2.f64()
//println("$s1 $s2 $delta")
@ -56,7 +56,7 @@ fn test_atof() {
// we don't test atof_quick beacuse we already know the rounding error
for c,x in src_num_str {
b := src_num[c].strlong()
a1 := atof64(x).strlong()
a1 := strconv.atof64(x).strlong()
assert a1 == b
}