From b03d2c04fd88db909b40dfd7bd08fe13d8994ab9 Mon Sep 17 00:00:00 2001 From: "Chen.Zhidong" Date: Tue, 29 Sep 2020 17:04:20 +0800 Subject: [PATCH] move TestCloneNilConfig() into tls_test.go --- src/crypto/tls/common_test.go | 17 ----------------- src/crypto/tls/tls_test.go | 7 +++++++ 2 files changed, 7 insertions(+), 17 deletions(-) delete mode 100644 src/crypto/tls/common_test.go diff --git a/src/crypto/tls/common_test.go b/src/crypto/tls/common_test.go deleted file mode 100644 index 226d7c32c2..0000000000 --- a/src/crypto/tls/common_test.go +++ /dev/null @@ -1,17 +0,0 @@ -// 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) { - var config *tls.Config - if cc := config.Clone(); cc != nil { - t.Fatalf("Clone with nil should return nil, got: %+v", cc) - } -} diff --git a/src/crypto/tls/tls_test.go b/src/crypto/tls/tls_test.go index 198423414b..b408b2a2c2 100644 --- a/src/crypto/tls/tls_test.go +++ b/src/crypto/tls/tls_test.go @@ -841,6 +841,13 @@ func TestCloneNonFuncFields(t *testing.T) { } } +func TestCloneNilConfig(t *testing.T) { + var config *Config + if cc := config.Clone(); cc != nil { + t.Fatalf("Clone with nil should return nil, got: %+v", cc) + } +} + // changeImplConn is a net.Conn which can change its Write and Close // methods. type changeImplConn struct {