-
-
Notifications
You must be signed in to change notification settings - Fork 266
/
beer_test.go
167 lines (125 loc) · 2.24 KB
/
beer_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
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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
package gofakeit
import (
"fmt"
"testing"
)
func ExampleBeerName() {
Seed(11)
fmt.Println(BeerName())
// Output: Sierra Nevada Bigfoot Barleywine Style Ale
}
func ExampleFaker_BeerName() {
f := New(11)
fmt.Println(f.BeerName())
// Output: Sierra Nevada Bigfoot Barleywine Style Ale
}
func BenchmarkBeerName(b *testing.B) {
for i := 0; i < b.N; i++ {
BeerName()
}
}
func ExampleBeerStyle() {
Seed(11)
fmt.Println(BeerStyle())
// Output: Vegetable Beer
}
func ExampleFaker_BeerStyle() {
f := New(11)
fmt.Println(f.BeerStyle())
// Output: Vegetable Beer
}
func BenchmarkBeerStyle(b *testing.B) {
for i := 0; i < b.N; i++ {
BeerStyle()
}
}
func ExampleBeerHop() {
Seed(11)
fmt.Println(BeerHop())
// Output: TriplePearl
}
func ExampleFaker_BeerHop() {
f := New(11)
fmt.Println(f.BeerHop())
// Output: TriplePearl
}
func BenchmarkBeerHop(b *testing.B) {
for i := 0; i < b.N; i++ {
BeerHop()
}
}
func ExampleBeerYeast() {
Seed(11)
fmt.Println(BeerYeast())
// Output: 2308 - Munich Lager
}
func ExampleFaker_BeerYeast() {
f := New(11)
fmt.Println(f.BeerYeast())
// Output: 2308 - Munich Lager
}
func BenchmarkBeerYeast(b *testing.B) {
for i := 0; i < b.N; i++ {
BeerYeast()
}
}
func ExampleBeerMalt() {
Seed(11)
fmt.Println(BeerMalt())
// Output: Munich
}
func ExampleFaker_BeerMalt() {
f := New(11)
fmt.Println(f.BeerMalt())
// Output: Munich
}
func BenchmarkBeerMalt(b *testing.B) {
for i := 0; i < b.N; i++ {
BeerMalt()
}
}
func ExampleBeerIbu() {
Seed(11)
fmt.Println(BeerIbu())
// Output: 91 IBU
}
func ExampleFaker_BeerIbu() {
f := New(11)
fmt.Println(f.BeerIbu())
// Output: 91 IBU
}
func BenchmarkBeerIbu(b *testing.B) {
for i := 0; i < b.N; i++ {
BeerIbu()
}
}
func ExampleBeerAlcohol() {
Seed(11)
fmt.Println(BeerAlcohol())
// Output: 8.2%
}
func ExampleFaker_BeerAlcohol() {
f := New(11)
fmt.Println(f.BeerAlcohol())
// Output: 8.2%
}
func BenchmarkBeerAlcohol(b *testing.B) {
for i := 0; i < b.N; i++ {
BeerAlcohol()
}
}
func ExampleBeerBlg() {
Seed(11)
fmt.Println(BeerBlg())
// Output: 16.6°Blg
}
func ExampleFaker_BeerBlg() {
f := New(11)
fmt.Println(f.BeerBlg())
// Output: 16.6°Blg
}
func BenchmarkBeerBlg(b *testing.B) {
for i := 0; i < b.N; i++ {
BeerBlg()
}
}