-
Notifications
You must be signed in to change notification settings - Fork 0
/
gen.go
94 lines (69 loc) · 1.66 KB
/
gen.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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
package fnplot
import (
"unicode"
"github.com/leanovate/gopter"
"github.com/leanovate/gopter/gen"
)
type Generator gopter.Gen
// Floating point generators.
// ==========================
func Float64Range(min, max float64) Generator {
return Generator(gen.Float64Range(min, max))
}
func Float64() Generator {
return Generator(gen.Float64())
}
func Float32Range(min, max float32) Generator {
return Generator(gen.Float32Range(min, max))
}
func Float32() Generator {
return Generator(gen.Float32())
}
// Rune generators.
// ================
func RuneRange(min, max rune) Generator {
return Generator(gen.RuneRange(min, max))
}
func Rune() Generator {
return Generator(gen.Rune())
}
func RuneNoControl() Generator {
return Generator(RuneNoControl())
}
// Character generators.
// =====================
func NumChar() Generator {
return Generator(gen.NumChar())
}
func AlphaUpperChar() Generator {
return Generator(gen.AlphaUpperChar())
}
func AlphaLowerChar() Generator {
return Generator(gen.AlphaLowerChar())
}
func AlphaChar() Generator {
return Generator(gen.AlphaChar())
}
func AlphaNumChar() Generator {
return Generator(gen.AlphaNumChar())
}
func UnicodeChar(table *unicode.RangeTable) Generator {
return Generator(gen.UnicodeChar(table))
}
// String generators.
// ==================
func AnyString() Generator {
return Generator(gen.AnyString())
}
func AlphaString() Generator {
return Generator(gen.AlphaString())
}
func NumString() Generator {
return Generator(gen.NumString())
}
func Identifier() Generator {
return Generator(gen.Identifier())
}
func UnicodeString(table *unicode.RangeTable) Generator {
return Generator(gen.UnicodeString(table))
}