1
0
mirror of https://github.com/golang/go synced 2024-11-17 16:04:47 -07:00

add Go copyright header, simplify the test

This commit is contained in:
Chen.Zhidong 2020-09-27 13:55:49 +08:00
parent 5315c311a1
commit bc108a04a3

View File

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