@@ -25,12 +25,12 @@ func Match(t *testing.T, regex, expected string) {
25
25
func AssertURL (t * testing.T , expect , actual string , msgAndArgs ... interface {}) bool {
26
26
expectURL , err := url .Parse (expect )
27
27
if err != nil {
28
- t .Errorf (errMsg ("unable to parse expected URL" , err , msgAndArgs ))
28
+ t .Error (errMsg ("unable to parse expected URL" , err , msgAndArgs ))
29
29
return false
30
30
}
31
31
actualURL , err := url .Parse (actual )
32
32
if err != nil {
33
- t .Errorf (errMsg ("unable to parse actual URL" , err , msgAndArgs ))
33
+ t .Error (errMsg ("unable to parse actual URL" , err , msgAndArgs ))
34
34
return false
35
35
}
36
36
@@ -47,12 +47,12 @@ var queryMapKey = regexp.MustCompile("(.*?)\\.[0-9]+\\.key")
47
47
func AssertQuery (t * testing.T , expect , actual string , msgAndArgs ... interface {}) bool {
48
48
expectQ , err := url .ParseQuery (expect )
49
49
if err != nil {
50
- t .Errorf (errMsg ("unable to parse expected Query" , err , msgAndArgs ))
50
+ t .Error (errMsg ("unable to parse expected Query" , err , msgAndArgs ))
51
51
return false
52
52
}
53
53
actualQ , err := url .ParseQuery (actual )
54
54
if err != nil {
55
- t .Errorf (errMsg ("unable to parse actual Query" , err , msgAndArgs ))
55
+ t .Error (errMsg ("unable to parse actual Query" , err , msgAndArgs ))
56
56
return false
57
57
}
58
58
@@ -99,13 +99,13 @@ func AssertQuery(t *testing.T, expect, actual string, msgAndArgs ...interface{})
99
99
func AssertJSON (t * testing.T , expect , actual string , msgAndArgs ... interface {}) bool {
100
100
expectVal := map [string ]interface {}{}
101
101
if err := json .Unmarshal ([]byte (expect ), & expectVal ); err != nil {
102
- t .Errorf (errMsg ("unable to parse expected JSON" , err , msgAndArgs ... ))
102
+ t .Error (errMsg ("unable to parse expected JSON" , err , msgAndArgs ... ))
103
103
return false
104
104
}
105
105
106
106
actualVal := map [string ]interface {}{}
107
107
if err := json .Unmarshal ([]byte (actual ), & actualVal ); err != nil {
108
- t .Errorf (errMsg ("unable to parse actual JSON" , err , msgAndArgs ... ))
108
+ t .Error (errMsg ("unable to parse actual JSON" , err , msgAndArgs ... ))
109
109
return false
110
110
}
111
111
0 commit comments