You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
372 B

package convert
import (
"fmt"
"testing"
)
func TestConv_StrToInt(t *testing.T) {
fmt.Println(conv.StrToInt("345"))
fmt.Println(conv.StrToInt("3r45"))
fmt.Println(conv.StrToInt("3r45", 45))
}
func TestConv_StrToInt64(t *testing.T) {
fmt.Println(conv.StrToInt64("34567"))
fmt.Println(conv.StrToInt64("34ttt567"))
fmt.Println(conv.StrToInt64("34ttt567", 789))
}