forked from brianvoe/gofakeit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
hipster_test.go
118 lines (96 loc) · 5.05 KB
/
hipster_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
package gofakeit
import (
"fmt"
"testing"
)
func ExampleHipsterWord() {
Seed(11)
fmt.Println(HipsterWord())
// Output: microdosing
}
func ExampleFaker_HipsterWord() {
f := New(11)
fmt.Println(f.HipsterWord())
// Output: microdosing
}
func BenchmarkHipsterWord(b *testing.B) {
b.Run("package", func(b *testing.B) {
for i := 0; i < b.N; i++ {
HipsterWord()
}
})
b.Run("Faker math", func(b *testing.B) {
f := New(0)
for i := 0; i < b.N; i++ {
f.HipsterWord()
}
})
b.Run("Faker crypto", func(b *testing.B) {
f := NewCrypto()
for i := 0; i < b.N; i++ {
f.HipsterWord()
}
})
}
func ExampleHipsterSentence() {
Seed(11)
fmt.Println(HipsterSentence(5))
// Output: Microdosing roof chia echo pickled.
}
func ExampleFaker_HipsterSentence() {
f := New(11)
fmt.Println(f.HipsterSentence(5))
// Output: Microdosing roof chia echo pickled.
}
func BenchmarkHipsterSentence(b *testing.B) {
b.Run("package", func(b *testing.B) {
for i := 0; i < b.N; i++ {
HipsterSentence(10)
}
})
b.Run("Faker math", func(b *testing.B) {
f := New(0)
for i := 0; i < b.N; i++ {
f.HipsterSentence(10)
}
})
b.Run("Faker crypto", func(b *testing.B) {
f := NewCrypto()
for i := 0; i < b.N; i++ {
f.HipsterSentence(10)
}
})
}
func ExampleHipsterParagraph() {
Seed(11)
fmt.Println(HipsterParagraph(3, 5, 12, "\n"))
// Output: Microdosing roof chia echo pickled meditation cold-pressed raw denim fingerstache normcore sriracha pork belly. Wolf try-hard pop-up blog tilde hashtag health butcher waistcoat paleo portland vinegar. Microdosing sartorial blue bottle slow-carb freegan five dollar toast you probably haven't heard of them asymmetrical chia farm-to-table narwhal banjo. Gluten-free blog authentic literally synth vinyl meh ethical health fixie banh mi Yuccie. Try-hard drinking squid seitan cray VHS echo chillwave hammock kombucha food truck sustainable.
// Pug bushwick hella tote bag cliche direct trade waistcoat yr waistcoat knausgaard pour-over master. Pitchfork jean shorts franzen flexitarian distillery hella meggings austin knausgaard crucifix wolf heirloom. Crucifix food truck you probably haven't heard of them trust fund fixie gentrify pitchfork stumptown mlkshk umami chambray blue bottle. 3 wolf moon swag +1 biodiesel knausgaard semiotics taxidermy meh artisan hoodie +1 blue bottle. Fashion axe forage mixtape Thundercats pork belly whatever 90's beard selfies chambray cred mlkshk.
// Shabby chic typewriter VHS readymade lo-fi bitters PBR&B gentrify lomo raw denim freegan put a bird on it. Raw denim cliche dreamcatcher pug fixie park trust fund migas fingerstache sriracha +1 mustache. Tilde shoreditch kickstarter franzen dreamcatcher green juice mustache neutra polaroid stumptown organic schlitz. Flexitarian ramps chicharrones kogi lo-fi mustache tilde forage street church-key williamsburg taxidermy. Chia mustache plaid mumblecore squid slow-carb disrupt Thundercats goth shoreditch master direct trade.
}
func ExampleFaker_HipsterParagraph() {
f := New(11)
fmt.Println(f.HipsterParagraph(3, 5, 12, "\n"))
// Output: Microdosing roof chia echo pickled meditation cold-pressed raw denim fingerstache normcore sriracha pork belly. Wolf try-hard pop-up blog tilde hashtag health butcher waistcoat paleo portland vinegar. Microdosing sartorial blue bottle slow-carb freegan five dollar toast you probably haven't heard of them asymmetrical chia farm-to-table narwhal banjo. Gluten-free blog authentic literally synth vinyl meh ethical health fixie banh mi Yuccie. Try-hard drinking squid seitan cray VHS echo chillwave hammock kombucha food truck sustainable.
// Pug bushwick hella tote bag cliche direct trade waistcoat yr waistcoat knausgaard pour-over master. Pitchfork jean shorts franzen flexitarian distillery hella meggings austin knausgaard crucifix wolf heirloom. Crucifix food truck you probably haven't heard of them trust fund fixie gentrify pitchfork stumptown mlkshk umami chambray blue bottle. 3 wolf moon swag +1 biodiesel knausgaard semiotics taxidermy meh artisan hoodie +1 blue bottle. Fashion axe forage mixtape Thundercats pork belly whatever 90's beard selfies chambray cred mlkshk.
// Shabby chic typewriter VHS readymade lo-fi bitters PBR&B gentrify lomo raw denim freegan put a bird on it. Raw denim cliche dreamcatcher pug fixie park trust fund migas fingerstache sriracha +1 mustache. Tilde shoreditch kickstarter franzen dreamcatcher green juice mustache neutra polaroid stumptown organic schlitz. Flexitarian ramps chicharrones kogi lo-fi mustache tilde forage street church-key williamsburg taxidermy. Chia mustache plaid mumblecore squid slow-carb disrupt Thundercats goth shoreditch master direct trade.
}
func BenchmarkHipsterParagraph(b *testing.B) {
b.Run("package", func(b *testing.B) {
for i := 0; i < b.N; i++ {
HipsterParagraph(3, 5, 12, "\n")
}
})
b.Run("Faker math", func(b *testing.B) {
f := New(0)
for i := 0; i < b.N; i++ {
f.HipsterParagraph(3, 5, 12, "\n")
}
})
b.Run("Faker crypto", func(b *testing.B) {
f := NewCrypto()
for i := 0; i < b.N; i++ {
f.HipsterParagraph(3, 5, 12, "\n")
}
})
}