(t *testing.T)
| 32 | } |
| 33 | |
| 34 | func TestExtractHeader(t *testing.T) { |
| 35 | r := bytes.NewBuffer(testHeader) |
| 36 | h, err := extractHeader(r) |
| 37 | if err != nil { |
| 38 | t.Error(err) |
| 39 | } |
| 40 | |
| 41 | if h.Program != constants.Program { |
| 42 | t.Errorf("expected Program %q, got %q", constants.Program, h.Program) |
| 43 | } |
| 44 | |
| 45 | if h.Version != constants.ProtocolVersion { |
| 46 | t.Errorf("expected version %q, got %q", constants.ProtocolVersion, h.Version) |
| 47 | } |
| 48 | |
| 49 | if h.Procedure != constants.ProcConnectOpen { |
| 50 | t.Errorf("expected procedure %q, got %q", constants.ProcConnectOpen, h.Procedure) |
| 51 | } |
| 52 | |
| 53 | if h.Type != Call { |
| 54 | t.Errorf("expected type %q, got %q", Call, h.Type) |
| 55 | } |
| 56 | |
| 57 | if h.Status != StatusOK { |
| 58 | t.Errorf("expected status %q, got %q", StatusOK, h.Status) |
| 59 | } |
| 60 | } |
nothing calls this directly
no test coverage detected
searching dependent graphs…