1
0
mirror of https://github.com/golang/go synced 2024-09-29 20:14:29 -06:00

move TestCloneNilConfig() into tls_test.go

This commit is contained in:
Chen.Zhidong 2020-09-29 17:04:20 +08:00
parent bc108a04a3
commit b03d2c04fd
2 changed files with 7 additions and 17 deletions

View File

@ -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)
}
}

View File

@ -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 {