@@ -134,14 +134,14 @@ func regexMatches(regex interface{}, value string) (*regexp.Regexp, bool, error)
134
134
}
135
135
136
136
// Equal validates that val1 is equal to val2 and throws an error with line number
137
- func Equal (t * testing.T , val1 , val2 interface {}) {
137
+ func Equal (t testing.TB , val1 , val2 interface {}) {
138
138
EqualSkip (t , 2 , val1 , val2 )
139
139
}
140
140
141
141
// EqualSkip validates that val1 is equal to val2 and throws an error with line number
142
142
// but the skip variable tells EqualSkip how far back on the stack to report the error.
143
143
// This is a building block to creating your own more complex validation functions.
144
- func EqualSkip (t * testing.T , skip int , val1 , val2 interface {}) {
144
+ func EqualSkip (t testing.TB , skip int , val1 , val2 interface {}) {
145
145
146
146
if ! IsEqual (val1 , val2 ) {
147
147
_ , file , line , _ := runtime .Caller (skip )
@@ -151,14 +151,14 @@ func EqualSkip(t *testing.T, skip int, val1, val2 interface{}) {
151
151
}
152
152
153
153
// NotEqual validates that val1 is not equal val2 and throws an error with line number
154
- func NotEqual (t * testing.T , val1 , val2 interface {}) {
154
+ func NotEqual (t testing.TB , val1 , val2 interface {}) {
155
155
NotEqualSkip (t , 2 , val1 , val2 )
156
156
}
157
157
158
158
// NotEqualSkip validates that val1 is not equal to val2 and throws an error with line number
159
159
// but the skip variable tells NotEqualSkip how far back on the stack to report the error.
160
160
// This is a building block to creating your own more complex validation functions.
161
- func NotEqualSkip (t * testing.T , skip int , val1 , val2 interface {}) {
161
+ func NotEqualSkip (t testing.TB , skip int , val1 , val2 interface {}) {
162
162
163
163
if IsEqual (val1 , val2 ) {
164
164
_ , file , line , _ := runtime .Caller (skip )
@@ -168,14 +168,14 @@ func NotEqualSkip(t *testing.T, skip int, val1, val2 interface{}) {
168
168
}
169
169
170
170
// PanicMatches validates that the panic output of running fn matches the supplied string
171
- func PanicMatches (t * testing.T , fn func (), matches string ) {
171
+ func PanicMatches (t testing.TB , fn func (), matches string ) {
172
172
PanicMatchesSkip (t , 2 , fn , matches )
173
173
}
174
174
175
175
// PanicMatchesSkip validates that the panic output of running fn matches the supplied string
176
176
// but the skip variable tells PanicMatchesSkip how far back on the stack to report the error.
177
177
// This is a building block to creating your own more complex validation functions.
178
- func PanicMatchesSkip (t * testing.T , skip int , fn func (), matches string ) {
178
+ func PanicMatchesSkip (t testing.TB , skip int , fn func (), matches string ) {
179
179
180
180
_ , file , line , _ := runtime .Caller (skip )
181
181
0 commit comments