MCPcopy
hub / github.com/gorilla/websocket / TestNetConn

Function TestNetConn

conn_test.go:575–583  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

573}
574
575func TestNetConn(t *testing.T) {
576 var b1, b2 bytes.Buffer
577 fc := fakeNetConn{Reader: &b1, Writer: &b2}
578 c := newConn(fc, true, 1024, 1024, nil, nil, nil)
579 ul := c.NetConn()
580 if ul != fc {
581 t.Fatalf("Underlying conn is not what it should be.")
582 }
583}
584
585func TestBufioReadBytes(t *testing.T) {
586 // Test calling bufio.ReadBytes for value longer than read buffer size.

Callers

nothing calls this directly

Calls 2

newConnFunction · 0.85
NetConnMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…