]> Cypherpunks repositories - gostls13.git/commitdiff
crypto/x509: use native compare in test instead of strings.Compare
authorxufei_Alex <badgangkiller@gmail.com>
Fri, 21 Apr 2017 01:43:57 +0000 (01:43 +0000)
committerBrad Fitzpatrick <bradfitz@golang.org>
Fri, 21 Apr 2017 02:49:21 +0000 (02:49 +0000)
Change-Id: I24c824edd8af6311a4eff44ef4bb28d73a91c68e
Reviewed-on: https://go-review.googlesource.com/41295
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>

src/crypto/x509/verify_test.go

index 2783feb15591747a64dc2eb7f2f20c2017cb24c3..56c365e1e8c072a8b37462f37c4d0e0d44b93a55 100644 (file)
@@ -1415,7 +1415,7 @@ func TestUnknownAuthorityError(t *testing.T) {
                        hintCert: c,
                }
                actual := uae.Error()
-               if strings.Compare(actual, tt.expected) != 0 {
+               if actual != tt.expected {
                        t.Errorf("#%d: UnknownAuthorityError.Error() response invalid actual: %s expected: %s", i, actual, tt.expected)
                }
        }