(t *testing.T)
| 1377 | } |
| 1378 | } |
| 1379 | func TestDecoder_ErrorUnset(t *testing.T) { |
| 1380 | t.Parallel() |
| 1381 | |
| 1382 | input := map[string]interface{}{ |
| 1383 | "vstring": "hello", |
| 1384 | "foo": "bar", |
| 1385 | } |
| 1386 | |
| 1387 | var result Basic |
| 1388 | config := &DecoderConfig{ |
| 1389 | ErrorUnset: true, |
| 1390 | Result: &result, |
| 1391 | } |
| 1392 | |
| 1393 | decoder, err := NewDecoder(config) |
| 1394 | if err != nil { |
| 1395 | t.Fatalf("err: %s", err) |
| 1396 | } |
| 1397 | |
| 1398 | err = decoder.Decode(input) |
| 1399 | if err == nil { |
| 1400 | t.Fatal("expected error") |
| 1401 | } |
| 1402 | } |
| 1403 | |
| 1404 | func TestMap(t *testing.T) { |
| 1405 | t.Parallel() |
nothing calls this directly
no test coverage detected