| // Copyright 2010 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 net_test | |
| import ( | |
| "net" | |
| "testing" | |
| "golang_org/x/net/nettest" | |
| ) | |
| func TestPipe(t *testing.T) { | |
| nettest.TestConn(t, func() (c1, c2 net.Conn, stop func(), err error) { | |
| c1, c2 = net.Pipe() | |
| stop = func() { | |
| c1.Close() | |
| c2.Close() | |
| } | |
| return | |
| }) | |
| } |