mirror of
https://github.com/golang/go
synced 2024-11-17 15:54:39 -07:00
move TestCloneNilConfig() into tls_test.go
This commit is contained in:
parent
bc108a04a3
commit
b03d2c04fd
@ -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)
|
|
||||||
}
|
|
||||||
}
|
|
@ -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
|
// changeImplConn is a net.Conn which can change its Write and Close
|
||||||
// methods.
|
// methods.
|
||||||
type changeImplConn struct {
|
type changeImplConn struct {
|
||||||
|
Loading…
Reference in New Issue
Block a user