@@ -28,12 +28,12 @@ func AssertURL(t *testing.T, expect, actual string, msgAndArgs ...interface{}) b
28
28
29
29
expectURL , err := url .Parse (expect )
30
30
if err != nil {
31
- t .Errorf (errMsg ("unable to parse expected URL" , err , msgAndArgs ))
31
+ t .Error (errMsg ("unable to parse expected URL" , err , msgAndArgs ))
32
32
return false
33
33
}
34
34
actualURL , err := url .Parse (actual )
35
35
if err != nil {
36
- t .Errorf (errMsg ("unable to parse actual URL" , err , msgAndArgs ))
36
+ t .Error (errMsg ("unable to parse actual URL" , err , msgAndArgs ))
37
37
return false
38
38
}
39
39
@@ -52,12 +52,12 @@ func AssertQuery(t *testing.T, expect, actual string, msgAndArgs ...interface{})
52
52
53
53
expectQ , err := url .ParseQuery (expect )
54
54
if err != nil {
55
- t .Errorf (errMsg ("unable to parse expected Query" , err , msgAndArgs ))
55
+ t .Error (errMsg ("unable to parse expected Query" , err , msgAndArgs ))
56
56
return false
57
57
}
58
58
actualQ , err := url .ParseQuery (actual )
59
59
if err != nil {
60
- t .Errorf (errMsg ("unable to parse actual Query" , err , msgAndArgs ))
60
+ t .Error (errMsg ("unable to parse actual Query" , err , msgAndArgs ))
61
61
return false
62
62
}
63
63
@@ -106,13 +106,13 @@ func AssertJSON(t *testing.T, expect, actual string, msgAndArgs ...interface{})
106
106
107
107
expectVal := map [string ]interface {}{}
108
108
if err := json .Unmarshal ([]byte (expect ), & expectVal ); err != nil {
109
- t .Errorf (errMsg ("unable to parse expected JSON" , err , msgAndArgs ... ))
109
+ t .Error (errMsg ("unable to parse expected JSON" , err , msgAndArgs ... ))
110
110
return false
111
111
}
112
112
113
113
actualVal := map [string ]interface {}{}
114
114
if err := json .Unmarshal ([]byte (actual ), & actualVal ); err != nil {
115
- t .Errorf (errMsg ("unable to parse actual JSON" , err , msgAndArgs ... ))
115
+ t .Error (errMsg ("unable to parse actual JSON" , err , msgAndArgs ... ))
116
116
return false
117
117
}
118
118
@@ -123,12 +123,12 @@ func AssertJSON(t *testing.T, expect, actual string, msgAndArgs ...interface{})
123
123
func AssertXML (t * testing.T , expect , actual string , container interface {}, msgAndArgs ... interface {}) bool {
124
124
expectVal := container
125
125
if err := xml .Unmarshal ([]byte (expect ), & expectVal ); err != nil {
126
- t .Errorf (errMsg ("unable to parse expected XML" , err , msgAndArgs ... ))
126
+ t .Error (errMsg ("unable to parse expected XML" , err , msgAndArgs ... ))
127
127
}
128
128
129
129
actualVal := container
130
130
if err := xml .Unmarshal ([]byte (actual ), & actualVal ); err != nil {
131
- t .Errorf (errMsg ("unable to parse actual XML" , err , msgAndArgs ... ))
131
+ t .Error (errMsg ("unable to parse actual XML" , err , msgAndArgs ... ))
132
132
}
133
133
return equal (t , expectVal , actualVal , msgAndArgs ... )
134
134
}
0 commit comments