-
Notifications
You must be signed in to change notification settings - Fork 0
/
rand_test.go
60 lines (49 loc) · 1.02 KB
/
rand_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
// Copyright 2022 Hollson. All rights reserved.
// Use of this source code is governed by a MIT style
// license that can be found in the LICENSE file.
package gdk
import (
"fmt"
"testing"
)
func TestNumberString(t *testing.T) {
for i := 0; i < 10; i++ {
fmt.Println(RandNumStr(20))
}
}
func TestLetterString(t *testing.T) {
for i := 0; i < 10; i++ {
fmt.Println(RandString(20))
}
}
func TestPasswordString(t *testing.T) {
for i := 0; i < 10; i++ {
fmt.Println(RandPassword(20))
}
}
func TestRandSequence(t *testing.T) {
for i := 0; i < 10; i++ {
fmt.Println(RandSequence(5))
}
}
func TestRandScopeInt(t *testing.T) {
for i := 0; i < 100; i++ {
fmt.Println(RandScopeInt(0, 10))
}
for i := 0; i < 10; i++ {
fmt.Println(RandScopeInt(100, 999))
}
for i := 0; i < 10; i++ {
fmt.Println(RandScopeInt(10000, 99999))
}
}
func TestRandInt64(t *testing.T) {
for i := 0; i < 10; i++ {
fmt.Println(RandInt64(1000))
}
}
func TestRandInt(t *testing.T) {
for i := 0; i < 10; i++ {
fmt.Println(RandInt(1000))
}
}