From 19700d53a8578d335dc803ac94cc7c6c72e9920a Mon Sep 17 00:00:00 2001 From: Daiki Ueno Date: Sat, 23 Sep 2023 17:24:22 +0900 Subject: [PATCH] crypto/tls: pretty-print SignatureScheme in tests When running crypto/tls tests with GOEXPERIMENT=boringcrypto, some tests are embedded with unreadable hexadecimal values: === RUN TestBoringServerSignatureAndHash/5053...3536 This corresponds to a string representation of SignatureScheme as it implements fmt.Stringer. With this change, the above will be printed as: === RUN TestBoringServerSignatureAndHash/PSSWithSHA256 Signed-off-by: Daiki Ueno --- src/crypto/tls/boring_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/crypto/tls/boring_test.go b/src/crypto/tls/boring_test.go index ba68f355eb..085ff5713e 100644 --- a/src/crypto/tls/boring_test.go +++ b/src/crypto/tls/boring_test.go @@ -200,7 +200,7 @@ func TestBoringServerSignatureAndHash(t *testing.T) { }() for _, sigHash := range defaultSupportedSignatureAlgorithms { - t.Run(fmt.Sprintf("%#x", sigHash), func(t *testing.T) { + t.Run(fmt.Sprintf("%v", sigHash), func(t *testing.T) { serverConfig := testConfig.Clone() serverConfig.Certificates = make([]Certificate, 1)