-
-
Notifications
You must be signed in to change notification settings - Fork 263
/
food_test.go
166 lines (125 loc) · 2.24 KB
/
food_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
package gofakeit
import (
"fmt"
"testing"
)
func ExampleFruit() {
Seed(11)
fmt.Println(Fruit())
// Output: Redcurrant
}
func ExampleFaker_Fruit() {
f := New(11)
fmt.Println(f.Fruit())
// Output: Redcurrant
}
func BenchmarkFruit(b *testing.B) {
for i := 0; i < b.N; i++ {
Fruit()
}
}
func ExampleVegetable() {
Seed(11)
fmt.Println(Vegetable())
// Output: Sweet Potato
}
func ExampleFaker_Vegetable() {
f := New(11)
fmt.Println(f.Vegetable())
// Output: Sweet Potato
}
func BenchmarkVegetable(b *testing.B) {
for i := 0; i < b.N; i++ {
Vegetable()
}
}
func ExampleBreakfast() {
Seed(11)
fmt.Println(Breakfast())
// Output: Purple cow
}
func ExampleFaker_Breakfast() {
f := New(11)
fmt.Println(f.Breakfast())
// Output: Purple cow
}
func BenchmarkBreakfast(b *testing.B) {
for i := 0; i < b.N; i++ {
Breakfast()
}
}
func ExampleLunch() {
Seed(11)
fmt.Println(Lunch())
// Output: Quick chile relleno casserole
}
func ExampleFaker_Lunch() {
f := New(11)
fmt.Println(f.Lunch())
// Output: Quick chile relleno casserole
}
func BenchmarkLunch(b *testing.B) {
for i := 0; i < b.N; i++ {
Lunch()
}
}
func ExampleDinner() {
Seed(11)
fmt.Println(Dinner())
// Output: German apple cake with cream cheese frosting
}
func ExampleFaker_Dinner() {
f := New(11)
fmt.Println(f.Dinner())
// Output: German apple cake with cream cheese frosting
}
func BenchmarkDinner(b *testing.B) {
for i := 0; i < b.N; i++ {
Dinner()
}
}
func ExampleDrink() {
Seed(11)
fmt.Println(Drink())
// Output: Wine
}
func ExampleFaker_Drink() {
f := New(11)
fmt.Println(f.Drink())
// Output: Wine
}
func BenchmarkDrink(b *testing.B) {
for i := 0; i < b.N; i++ {
Drink()
}
}
func ExampleSnack() {
Seed(11)
fmt.Println(Snack())
// Output: Fantastic banana bran muffins
}
func ExampleFaker_Snack() {
f := New(11)
fmt.Println(f.Snack())
// Output: Fantastic banana bran muffins
}
func BenchmarkSnack(b *testing.B) {
for i := 0; i < b.N; i++ {
Snack()
}
}
func ExampleDessert() {
Seed(11)
fmt.Println(Dessert())
// Output: Amish cream pie
}
func ExampleFaker_Dessert() {
f := New(11)
fmt.Println(f.Dessert())
// Output: Amish cream pie
}
func BenchmarkDessert(b *testing.B) {
for i := 0; i < b.N; i++ {
Dessert()
}
}