From: xufei_Alex Date: Fri, 21 Apr 2017 01:43:57 +0000 (+0000) Subject: crypto/x509: use native compare in test instead of strings.Compare X-Git-Tag: go1.9beta1~575 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=db8437eb58a5c2282a27c71b5cb14c639655edf1;p=gostls13.git crypto/x509: use native compare in test instead of strings.Compare Change-Id: I24c824edd8af6311a4eff44ef4bb28d73a91c68e Reviewed-on: https://go-review.googlesource.com/41295 Reviewed-by: Brad Fitzpatrick Run-TryBot: Brad Fitzpatrick TryBot-Result: Gobot Gobot --- diff --git a/src/crypto/x509/verify_test.go b/src/crypto/x509/verify_test.go index 2783feb155..56c365e1e8 100644 --- a/src/crypto/x509/verify_test.go +++ b/src/crypto/x509/verify_test.go @@ -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) } }