(t *testing.T)
| 526 | } |
| 527 | |
| 528 | func TestFieldsArrayNil(t *testing.T) { |
| 529 | out := &bytes.Buffer{} |
| 530 | log := New(out) |
| 531 | log.Log(). |
| 532 | Objects("objs", nil). |
| 533 | ObjectsV("objs_v"). |
| 534 | Strs("strs", nil). |
| 535 | StrsV("strs_v"). |
| 536 | Stringers("stringers", nil). |
| 537 | StringersV("stringers_v"). |
| 538 | Errs("err", nil). |
| 539 | Bools("bool", nil). |
| 540 | Ints("int", nil). |
| 541 | Ints8("int8", nil). |
| 542 | Ints16("int16", nil). |
| 543 | Ints32("int32", nil). |
| 544 | Ints64("int64", nil). |
| 545 | Uints("uint", nil). |
| 546 | Uints8("uint8", nil). |
| 547 | Uints16("uint16", nil). |
| 548 | Uints32("uint32", nil). |
| 549 | Uints64("uint64", nil). |
| 550 | Floats32("float32", nil). |
| 551 | Floats64("float64", nil). |
| 552 | Durs("dur", nil). |
| 553 | Times("time", nil). |
| 554 | IPAddrs("ip", nil). |
| 555 | IPPrefixes("pfx", nil). |
| 556 | Msg("") |
| 557 | if got, want := decodeIfBinaryToString(out.Bytes()), `{"objs":[],"objs_v":[],"strs":[],"strs_v":[],"stringers":[],"stringers_v":[],"err":[],"bool":[],"int":[],"int8":[],"int16":[],"int32":[],"int64":[],"uint":[],"uint8":[],"uint16":[],"uint32":[],"uint64":[],"float32":[],"float64":[],"dur":[],"time":[],"ip":[],"pfx":[]}`+"\n"; got != want { |
| 558 | t.Errorf("invalid log output:\ngot: %v\nwant: %v", got, want) |
| 559 | } |
| 560 | } |
| 561 | |
| 562 | func TestFieldsArrayEmpty(t *testing.T) { |
| 563 | out := &bytes.Buffer{} |
nothing calls this directly
no test coverage detected