feat: add functions.

This commit is contained in:
tx7do
2023-10-06 19:42:06 +08:00
parent a5ffa41fea
commit 03d09f2415
6 changed files with 525 additions and 0 deletions

17
rand/rand_test.go Normal file
View File

@@ -0,0 +1,17 @@
package rand
import (
"fmt"
"testing"
"github.com/stretchr/testify/assert"
)
func TestRandomInt(t *testing.T) {
for i := 0; i < 1000; i++ {
n := RandomInt(1, 100)
fmt.Println(n)
assert.True(t, n >= 1)
assert.True(t, n < 100)
}
}