(t *testing.T)
| 151 | } |
| 152 | |
| 153 | func TestContextHeader(t *testing.T) { |
| 154 | c, _ := e.NewContext() |
| 155 | |
| 156 | for _, tt := range headerTests { |
| 157 | if _, err := c.Eval(tt.script); err != nil { |
| 158 | t.Errorf("Context.Eval('%s'): %s", tt.script, err) |
| 159 | continue |
| 160 | } |
| 161 | |
| 162 | if reflect.DeepEqual(c.Header, tt.expected) == false { |
| 163 | t.Errorf("Context.Eval('%s'): expected '%#v', actual '%#v'", tt.script, tt.expected, c.Header) |
| 164 | } |
| 165 | } |
| 166 | |
| 167 | c.Destroy() |
| 168 | } |
| 169 | |
| 170 | var logTests = []struct { |
| 171 | script string |
nothing calls this directly
no test coverage detected