(t *testing.T)
| 332 | } |
| 333 | |
| 334 | func TestBasic_Merge(t *testing.T) { |
| 335 | t.Parallel() |
| 336 | |
| 337 | input := map[string]interface{}{ |
| 338 | "vint": 42, |
| 339 | } |
| 340 | |
| 341 | var result Basic |
| 342 | result.Vuint = 100 |
| 343 | err := Decode(input, &result) |
| 344 | if err != nil { |
| 345 | t.Fatalf("got an err: %s", err) |
| 346 | } |
| 347 | |
| 348 | expected := Basic{ |
| 349 | Vint: 42, |
| 350 | Vuint: 100, |
| 351 | } |
| 352 | if !reflect.DeepEqual(result, expected) { |
| 353 | t.Fatalf("bad: %#v", result) |
| 354 | } |
| 355 | } |
| 356 | |
| 357 | // Test for issue #46. |
| 358 | func TestBasic_Struct(t *testing.T) { |