(t *testing.T)
| 549 | } |
| 550 | |
| 551 | func TestDecode_EmbeddedArray(t *testing.T) { |
| 552 | t.Parallel() |
| 553 | |
| 554 | input := map[string]interface{}{ |
| 555 | "array_alias": [2]string{"foo", "bar"}, |
| 556 | "vunique": "bar", |
| 557 | } |
| 558 | |
| 559 | var result EmbeddedArray |
| 560 | err := Decode(input, &result) |
| 561 | if err != nil { |
| 562 | t.Fatalf("got an err: %s", err.Error()) |
| 563 | } |
| 564 | |
| 565 | if !reflect.DeepEqual(result.ArrayAlias, ArrayAlias([2]string{"foo", "bar"})) { |
| 566 | t.Errorf("array value: %#v", result.ArrayAlias) |
| 567 | } |
| 568 | |
| 569 | if result.Vunique != "bar" { |
| 570 | t.Errorf("vunique value should be 'bar': %#v", result.Vunique) |
| 571 | } |
| 572 | } |
| 573 | |
| 574 | func TestDecode_decodeSliceWithArray(t *testing.T) { |
| 575 | t.Parallel() |
nothing calls this directly
no test coverage detected