添加部分测试

This commit is contained in:
Yun
2024-01-11 21:48:44 +08:00
parent 97f9a0cb86
commit 832e70ba48
2 changed files with 20 additions and 2 deletions
+18
View File
@@ -6,6 +6,24 @@ import (
"code.yun.ink/pkg/convx"
)
func Test64(t *testing.T) {
// 测试10进制转64进制
var v_int int = 123456789
str := convx.Encode10To64(v_int)
if str != "7MyqL" {
t.Fail()
t.Log(str)
}
// 测试64进制转10进制
var v_string string = "7MyqL"
i := convx.Decode64To10(v_string)
if i != 123456789 {
t.Fail()
t.Log(i)
}
}
func TestConvToString(t *testing.T) {
// 日志
// t.Log("hello world")