@@ -24,7 +24,6 @@ import (
24
24
"testing"
25
25
26
26
imagespec "github.com/opencontainers/image-spec/specs-go/v1"
27
- "github.com/stretchr/testify/assert"
28
27
"golang.org/x/sys/windows"
29
28
)
30
29
@@ -66,7 +65,9 @@ func TestDefaultMatchComparer(t *testing.T) {
66
65
match : false ,
67
66
},
68
67
} {
69
- assert .Equal (t , test .match , defaultMatcher .Match (test .platform ))
68
+ if actual := defaultMatcher .Match (test .platform ); actual != test .match {
69
+ t .Errorf ("expected: %v, actual: %v" , test .match , actual )
70
+ }
70
71
}
71
72
72
73
}
@@ -138,7 +139,9 @@ func TestMatchComparerMatch_WCOW(t *testing.T) {
138
139
match : false ,
139
140
},
140
141
} {
141
- assert .Equal (t , test .match , m .Match (test .platform ), "should match: %t, %s to %s" , test .match , m .Platform , test .platform )
142
+ if actual := m .Match (test .platform ); actual != test .match {
143
+ t .Errorf ("should match: %t, %s to %s" , test .match , m .Platform , test .platform )
144
+ }
142
145
}
143
146
}
144
147
@@ -262,7 +265,9 @@ func TestMatchComparerMatch_ABICheckWCOW(t *testing.T) {
262
265
match : true ,
263
266
},
264
267
} {
265
- assert .Equal (t , test .match , test .hostPlatformMatcher .Match (test .testPlatform ), "should match: %t, %s to %s" , test .match , test .hostPlatformMatcher .Platform , test .testPlatform )
268
+ if actual := test .hostPlatformMatcher .Match (test .testPlatform ); actual != test .match {
269
+ t .Errorf ("should match: %t, %s to %s" , test .match , test .hostPlatformMatcher .Platform , test .testPlatform )
270
+ }
266
271
}
267
272
}
268
273
@@ -323,7 +328,9 @@ func TestMatchComparerMatch_LCOW(t *testing.T) {
323
328
match : true ,
324
329
},
325
330
} {
326
- assert .Equal (t , test .match , m .Match (test .platform ), "should match %b, %s to %s" , test .match , m .Platform , test .platform )
331
+ if actual := m .Match (test .platform ); actual != test .match {
332
+ t .Errorf ("should match: %t, %s to %s" , test .match , m .Platform , test .platform )
333
+ }
327
334
}
328
335
}
329
336
@@ -390,5 +397,7 @@ func TestMatchComparerLess(t *testing.T) {
390
397
sort .SliceStable (platforms , func (i , j int ) bool {
391
398
return m .Less (platforms [i ], platforms [j ])
392
399
})
393
- assert .Equal (t , expected , platforms )
400
+ if ! reflect .DeepEqual (platforms , expected ) {
401
+ t .Errorf ("expected: %s\n actual : %s" , expected , platforms )
402
+ }
394
403
}
0 commit comments