@@ -23,6 +23,7 @@ func TestMain(m *testing.M) {
23
23
// end-snippet
24
24
25
25
func TestVerifyStringApproval (t * testing.T ) {
26
+ t .Parallel ()
26
27
// begin-snippet: inline_reporter
27
28
r := UseReporter (reporters .NewContinuousIntegrationReporter ())
28
29
defer r .Close ()
@@ -32,6 +33,7 @@ func TestVerifyStringApproval(t *testing.T) {
32
33
}
33
34
34
35
func TestReporterFromSetup (t * testing.T ) {
36
+ t .Parallel ()
35
37
VerifyString (t , hello ("World" ))
36
38
}
37
39
@@ -53,16 +55,17 @@ func hello(name string) string {
53
55
}
54
56
55
57
func TestParameterizedTests (t * testing.T ) {
56
- t .Parallel ()
57
58
for _ , tc := range ExampleParameterizedTestcases {
58
59
tc := tc
59
60
t .Run (tc .name , func (t * testing.T ) {
61
+ t .Parallel ()
60
62
VerifyString (t , hello (tc .value ))
61
63
})
62
64
}
63
65
}
64
66
65
67
func TestVerifyXMLStruct (t * testing.T ) {
68
+ t .Parallel ()
66
69
json := struct {
67
70
XMLName xml.Name `xml:"Test"`
68
71
Title string
@@ -78,6 +81,7 @@ func TestVerifyXMLStruct(t *testing.T) {
78
81
}
79
82
80
83
func TestVerifyBadXMLStruct (t * testing.T ) {
84
+ t .Parallel ()
81
85
xmlContent := struct {
82
86
Title string
83
87
}{
@@ -88,16 +92,19 @@ func TestVerifyBadXMLStruct(t *testing.T) {
88
92
}
89
93
90
94
func TestVerifyXMLBytes (t * testing.T ) {
95
+ t .Parallel ()
91
96
xmlb := []byte ("<Test><Title>Hello World!</Title><Name>Peter Pan</Name><Age>100</Age></Test>" )
92
97
VerifyXMLBytes (t , xmlb )
93
98
}
94
99
95
100
func TestVerifyBadXMLBytes (t * testing.T ) {
101
+ t .Parallel ()
96
102
xmlb := []byte ("Test></Test>" )
97
103
VerifyXMLBytes (t , xmlb )
98
104
}
99
105
100
106
func TestVerifyJSONStruct (t * testing.T ) {
107
+ t .Parallel ()
101
108
json := struct {
102
109
Title string
103
110
Name string
@@ -112,16 +119,19 @@ func TestVerifyJSONStruct(t *testing.T) {
112
119
}
113
120
114
121
func TestVerifyJSONBytes (t * testing.T ) {
122
+ t .Parallel ()
115
123
jsonb := []byte ("{ \" foo\" : \" bar\" , \" age\" : 42, \" bark\" : \" woof\" }" )
116
124
VerifyJSONBytes (t , jsonb )
117
125
}
118
126
119
127
func TestVerifyBadJSONBytes (t * testing.T ) {
128
+ t .Parallel ()
120
129
jsonb := []byte ("{ foo: \" bar\" , \" age\" : 42, \" bark\" : \" woof\" }" )
121
130
VerifyJSONBytes (t , jsonb )
122
131
}
123
132
124
133
func TestVerifyMap (t * testing.T ) {
134
+ t .Parallel ()
125
135
m := map [string ]string {
126
136
"dog" : "bark" ,
127
137
"cat" : "meow" ,
@@ -131,41 +141,49 @@ func TestVerifyMap(t *testing.T) {
131
141
}
132
142
133
143
func TestVerifyMapBadMap (t * testing.T ) {
144
+ t .Parallel ()
134
145
m := "foo"
135
146
VerifyMap (t , m )
136
147
}
137
148
138
149
func TestVerifyMapEmptyMap (t * testing.T ) {
150
+ t .Parallel ()
139
151
m := map [string ]string {}
140
152
VerifyMap (t , m )
141
153
}
142
154
143
155
func TestVerifyArray (t * testing.T ) {
156
+ t .Parallel ()
144
157
xs := []string {"dog" , "cat" , "bird" }
145
158
VerifyArray (t , xs )
146
159
}
147
160
148
161
func TestVerifyArrayBadArray (t * testing.T ) {
162
+ t .Parallel ()
149
163
xs := "string"
150
164
VerifyArray (t , xs )
151
165
}
152
166
153
167
func TestVerifyArrayEmptyArray (t * testing.T ) {
168
+ t .Parallel ()
154
169
var xs []string
155
170
VerifyArray (t , xs )
156
171
}
157
172
158
173
func TestVerifyArrayTransformation (t * testing.T ) {
174
+ t .Parallel ()
159
175
xs := []string {"Christopher" , "Llewellyn" }
160
176
VerifyAll (t , "uppercase" , xs , func (x interface {}) string { return fmt .Sprintf ("%s => %s" , x , strings .ToUpper (x .(string ))) })
161
177
}
162
178
163
179
func TestVerifyAllCombinationsFor1 (t * testing.T ) {
180
+ t .Parallel ()
164
181
xs := []string {"Christopher" , "Llewellyn" }
165
182
VerifyAllCombinationsFor1 (t , "uppercase" , func (x interface {}) string { return strings .ToUpper (x .(string )) }, xs )
166
183
}
167
184
168
185
func TestVerifyAllCombinationsForSkipped (t * testing.T ) {
186
+ t .Parallel ()
169
187
xs := []int {1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 }
170
188
VerifyAllCombinationsFor1 (
171
189
t ,
@@ -180,6 +198,7 @@ func TestVerifyAllCombinationsForSkipped(t *testing.T) {
180
198
}
181
199
182
200
func TestVerifyAllCombinationsFor2 (t * testing.T ) {
201
+ t .Parallel ()
183
202
xs1 := []string {"Christopher" , "Llewellyn" }
184
203
xs2 := []int {0 , 1 }
185
204
VerifyAllCombinationsFor2 (
@@ -191,6 +210,7 @@ func TestVerifyAllCombinationsFor2(t *testing.T) {
191
210
}
192
211
193
212
func TestVerifyAllCombinationsFor9 (t * testing.T ) {
213
+ t .Parallel ()
194
214
xs1 := []string {"Christopher" }
195
215
196
216
VerifyAllCombinationsFor9 (
0 commit comments