@@ -67,14 +67,14 @@ CASE4:
67
67
}
68
68
69
69
// Equal validates that val1 is equal to val2 and throws an error with line number
70
- func Equal (t * testing.T , val1 , val2 interface {}) {
70
+ func Equal (t testing.TB , val1 , val2 interface {}) {
71
71
EqualSkip (t , 2 , val1 , val2 )
72
72
}
73
73
74
74
// EqualSkip validates that val1 is equal to val2 and throws an error with line number
75
75
// but the skip variable tells EqualSkip how far back on the stack to report the error.
76
76
// This is a building block to creating your own more complex validation functions.
77
- func EqualSkip (t * testing.T , skip int , val1 , val2 interface {}) {
77
+ func EqualSkip (t testing.TB , skip int , val1 , val2 interface {}) {
78
78
79
79
if ! IsEqual (val1 , val2 ) {
80
80
_ , file , line , _ := runtime .Caller (skip )
@@ -84,14 +84,14 @@ func EqualSkip(t *testing.T, skip int, val1, val2 interface{}) {
84
84
}
85
85
86
86
// NotEqual validates that val1 is not equal val2 and throws an error with line number
87
- func NotEqual (t * testing.T , val1 , val2 interface {}) {
87
+ func NotEqual (t testing.TB , val1 , val2 interface {}) {
88
88
NotEqualSkip (t , 2 , val1 , val2 )
89
89
}
90
90
91
91
// NotEqualSkip validates that val1 is not equal to val2 and throws an error with line number
92
92
// but the skip variable tells NotEqualSkip how far back on the stack to report the error.
93
93
// This is a building block to creating your own more complex validation functions.
94
- func NotEqualSkip (t * testing.T , skip int , val1 , val2 interface {}) {
94
+ func NotEqualSkip (t testing.TB , skip int , val1 , val2 interface {}) {
95
95
96
96
if IsEqual (val1 , val2 ) {
97
97
_ , file , line , _ := runtime .Caller (skip )
@@ -101,14 +101,14 @@ func NotEqualSkip(t *testing.T, skip int, val1, val2 interface{}) {
101
101
}
102
102
103
103
// PanicMatches validates that the panic output of running fn matches the supplied string
104
- func PanicMatches (t * testing.T , fn func (), matches string ) {
104
+ func PanicMatches (t testing.TB , fn func (), matches string ) {
105
105
PanicMatchesSkip (t , 2 , fn , matches )
106
106
}
107
107
108
108
// PanicMatchesSkip validates that the panic output of running fn matches the supplied string
109
109
// but the skip variable tells PanicMatchesSkip how far back on the stack to report the error.
110
110
// This is a building block to creating your own more complex validation functions.
111
- func PanicMatchesSkip (t * testing.T , skip int , fn func (), matches string ) {
111
+ func PanicMatchesSkip (t testing.TB , skip int , fn func (), matches string ) {
112
112
113
113
_ , file , line , _ := runtime .Caller (skip )
114
114
0 commit comments