1
0
mirror of https://github.com/duke-git/lancet.git synced 2026-02-13 17:22:27 +08:00

增加test测试

This commit is contained in:
guanren
2024-10-18 13:34:01 +08:00
parent a72ca265dc
commit aa5c8c585c
2 changed files with 8 additions and 0 deletions

View File

@@ -3,6 +3,7 @@ package random
import (
"reflect"
"regexp"
"strconv"
"testing"
"github.com/duke-git/lancet/v2/internal"
@@ -361,3 +362,9 @@ func TestRandBoolSlice(t *testing.T) {
}
})
}
func TestRandNumLen(t *testing.T) {
t.Parallel()
randi := RandNumLen(6)
assert := internal.NewAssert(t, "TestRandNumLen")
assert.Equal(6, len(strconv.Itoa(randi)))
}