(t *testing.T)
| 27 | } |
| 28 | |
| 29 | func TestSubprotocols(t *testing.T) { |
| 30 | for _, st := range subprotocolTests { |
| 31 | r := http.Request{Header: http.Header{"Sec-Websocket-Protocol": {st.h}}} |
| 32 | protocols := Subprotocols(&r) |
| 33 | if !reflect.DeepEqual(st.protocols, protocols) { |
| 34 | t.Errorf("SubProtocols(%q) returned %#v, want %#v", st.h, protocols, st.protocols) |
| 35 | } |
| 36 | } |
| 37 | } |
| 38 | |
| 39 | var isWebSocketUpgradeTests = []struct { |
| 40 | ok bool |
nothing calls this directly
no test coverage detected
searching dependent graphs…