(t *testing.T)
| 301 | } |
| 302 | } |
| 303 | func TestAppendDurationInteger(t *testing.T) { |
| 304 | for _, tt := range internal.DurTestcases { |
| 305 | dur := tt.Duration |
| 306 | want := []byte{} |
| 307 | whole := int(dur) / int(time.Microsecond) |
| 308 | want = append(want, []byte(fmt.Sprintf("%v", whole))...) |
| 309 | got := enc.AppendDuration([]byte{}, dur, time.Microsecond, "", true, -1) |
| 310 | if !bytes.Equal(got, want) { |
| 311 | t.Errorf("AppendDuration(%v)=\ngot: %s\nwant: %s", |
| 312 | dur, |
| 313 | string(got), |
| 314 | string(want)) |
| 315 | } |
| 316 | } |
| 317 | } |
| 318 | func TestAppendDurations(t *testing.T) { |
| 319 | array := make([]time.Duration, len(internal.DurTestcases)) |
| 320 | want := make([]byte, 0) |
nothing calls this directly
no test coverage detected