(t *testing.T)
| 333 | } |
| 334 | |
| 335 | func TestValueBool(t *testing.T) { |
| 336 | c, _ := e.NewContext() |
| 337 | |
| 338 | for _, tt := range valueBoolTests { |
| 339 | val, err := NewValue(tt.value) |
| 340 | if err != nil { |
| 341 | t.Errorf("NewValue('%v'): %s", tt.value, err) |
| 342 | continue |
| 343 | } |
| 344 | |
| 345 | actual := val.Bool() |
| 346 | |
| 347 | if reflect.DeepEqual(actual, tt.expected) == false { |
| 348 | t.Errorf("Value.Bool('%v'): expected '%#v', actual '%#v'", tt.value, tt.expected, actual) |
| 349 | } |
| 350 | |
| 351 | val.Destroy() |
| 352 | } |
| 353 | |
| 354 | c.Destroy() |
| 355 | } |
| 356 | |
| 357 | var valueStringTests = []struct { |
| 358 | value interface{} |
nothing calls this directly
no test coverage detected