1
0
mirror of https://github.com/golang/go synced 2024-11-25 22:28:02 -07:00

use type inference better

Change-Id: I99701776951a81edf1ade8e55b0da1d08a51d865
This commit is contained in:
Mateusz Poliwczak 2023-09-21 13:38:29 +02:00
parent ba43130338
commit 9e9479acf9

View File

@ -3958,11 +3958,11 @@ func TestCertificateOIDPolicies(t *testing.T) {
t.Fatalf("ParseCertificate() unexpected error: %v", err)
}
if !slices.EqualFunc(cert.PolicyIdentifiers, expectPolicyIdentifiers, slices.Equal[asn1.ObjectIdentifier]) {
if !slices.EqualFunc(cert.PolicyIdentifiers, expectPolicyIdentifiers, slices.Equal) {
t.Errorf("cert.PolicyIdentifiers = %v, want: %v", cert.PolicyIdentifiers, expectPolicyIdentifiers)
}
if !slices.EqualFunc(cert.Policies, expectPolicies, func(o1, o2 OID) bool { return o1.Equal(o2) }) {
if !slices.EqualFunc(cert.Policies, expectPolicies, OID.Equal) {
t.Errorf("cert.Policies = %v, want: %v", cert.Policies, expectPolicies)
}
}