(t *testing.T)
| 215 | } |
| 216 | |
| 217 | func TestValueInt(t *testing.T) { |
| 218 | c, _ := e.NewContext() |
| 219 | |
| 220 | for _, tt := range valueIntTests { |
| 221 | val, err := NewValue(tt.value) |
| 222 | if err != nil { |
| 223 | t.Errorf("NewValue('%v'): %s", tt.value, err) |
| 224 | continue |
| 225 | } |
| 226 | |
| 227 | actual := val.Int() |
| 228 | |
| 229 | if reflect.DeepEqual(actual, tt.expected) == false { |
| 230 | t.Errorf("Value.Int('%v'): expected '%#v', actual '%#v'", tt.value, tt.expected, actual) |
| 231 | } |
| 232 | |
| 233 | val.Destroy() |
| 234 | } |
| 235 | |
| 236 | c.Destroy() |
| 237 | } |
| 238 | |
| 239 | var valueFloatTests = []struct { |
| 240 | value interface{} |
nothing calls this directly
no test coverage detected