From bc108a04a3327f811686d6b53979ed0732e9e64a Mon Sep 17 00:00:00 2001 From: "Chen.Zhidong" Date: Sun, 27 Sep 2020 13:55:49 +0800 Subject: [PATCH] add Go copyright header, simplify the test --- src/crypto/tls/common_test.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/crypto/tls/common_test.go b/src/crypto/tls/common_test.go index 7da556c51c..226d7c32c2 100644 --- a/src/crypto/tls/common_test.go +++ b/src/crypto/tls/common_test.go @@ -1,17 +1,17 @@ +// Copyright 2020 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + package tls_test import ( + "crypto/tls" "testing" ) func TestCloneNilConfig(t *testing.T) { - defer func() { - if r := recover(); r != nil { - t.Fatal("Clone a nil Config should not produce panic") - } - }() - - if cc := c.Clone(); cc != nil { + var config *tls.Config + if cc := config.Clone(); cc != nil { t.Fatalf("Clone with nil should return nil, got: %+v", cc) } }