feat: add functions.
This commit is contained in:
17
rand/rand_test.go
Normal file
17
rand/rand_test.go
Normal 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)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user