(t *testing.T)
| 381 | } |
| 382 | |
| 383 | func TestBasic_interfaceStruct(t *testing.T) { |
| 384 | t.Parallel() |
| 385 | |
| 386 | input := map[string]interface{}{ |
| 387 | "vstring": "foo", |
| 388 | } |
| 389 | |
| 390 | var iface interface{} = &Basic{} |
| 391 | err := Decode(input, &iface) |
| 392 | if err != nil { |
| 393 | t.Fatalf("got an err: %s", err) |
| 394 | } |
| 395 | |
| 396 | expected := &Basic{ |
| 397 | Vstring: "foo", |
| 398 | } |
| 399 | if !reflect.DeepEqual(iface, expected) { |
| 400 | t.Fatalf("bad: %#v", iface) |
| 401 | } |
| 402 | } |
| 403 | |
| 404 | // Issue 187 |
| 405 | func TestBasic_interfaceStructNonPtr(t *testing.T) { |