package helper import ( "strings" "testing" ) func Test_FloadAdd(t *testing.T) { // str1 := 4 str2 := "5" str3 := 6.5 // str4 := 1 ret := FloatAdd(str3, str2) t.Log(ret) percentage := "8:2:1" price := strings.Split(percentage, ":") ret = FloatAdd(price[0], price[1], price[2]) t.Log(ret) } func Test_FloatSub(t *testing.T) { str1 := 4.25 str2 := "5.33" ret := FloatSub(str1, str2) t.Log(ret) } func Test_FloatMul(t *testing.T) { str1 := 4.25 str2 := "5.33" ret := FloatMul(str1, str2, 1) t.Log(ret) } func Test_FloatQuo(t *testing.T) { str1 := 6 str2 := "7" ret := FloatQuo(str1, str2, 3) t.Log(ret) } func Test_TenToHex(t *testing.T) { str1 := 10664 ret := TenToHex(str1) t.Log(ret) } func Test_HexToTen(t *testing.T) { str := "29B79F0D" ret, err := HexToTen(str) t.Log(ret, err) }