(t *testing.T)
| 572 | } |
| 573 | |
| 574 | func TestDecode_decodeSliceWithArray(t *testing.T) { |
| 575 | t.Parallel() |
| 576 | |
| 577 | var result []int |
| 578 | input := [1]int{1} |
| 579 | expected := []int{1} |
| 580 | if err := Decode(input, &result); err != nil { |
| 581 | t.Fatalf("got an err: %s", err.Error()) |
| 582 | } |
| 583 | |
| 584 | if !reflect.DeepEqual(expected, result) { |
| 585 | t.Errorf("wanted %+v, got %+v", expected, result) |
| 586 | } |
| 587 | } |
| 588 | |
| 589 | func TestDecode_EmbeddedNoSquash(t *testing.T) { |
| 590 | t.Parallel() |