(t *testing.T)
| 526 | } |
| 527 | |
| 528 | func TestDecode_EmbeddedSlice(t *testing.T) { |
| 529 | t.Parallel() |
| 530 | |
| 531 | input := map[string]interface{}{ |
| 532 | "slice_alias": []string{"foo", "bar"}, |
| 533 | "vunique": "bar", |
| 534 | } |
| 535 | |
| 536 | var result EmbeddedSlice |
| 537 | err := Decode(input, &result) |
| 538 | if err != nil { |
| 539 | t.Fatalf("got an err: %s", err.Error()) |
| 540 | } |
| 541 | |
| 542 | if !reflect.DeepEqual(result.SliceAlias, SliceAlias([]string{"foo", "bar"})) { |
| 543 | t.Errorf("slice value: %#v", result.SliceAlias) |
| 544 | } |
| 545 | |
| 546 | if result.Vunique != "bar" { |
| 547 | t.Errorf("vunique value should be 'bar': %#v", result.Vunique) |
| 548 | } |
| 549 | } |
| 550 | |
| 551 | func TestDecode_EmbeddedArray(t *testing.T) { |
| 552 | t.Parallel() |
nothing calls this directly
no test coverage detected