(t *testing.T)
| 265 | } |
| 266 | } |
| 267 | func TestAppendDurationInteger(t *testing.T) { |
| 268 | for _, tt := range internal.DurTestcases { |
| 269 | dur := tt.Duration |
| 270 | want := []byte{} |
| 271 | want = append(want, []byte(tt.IntegerOut)...) |
| 272 | got := enc.AppendDuration([]byte{}, dur, time.Microsecond, "", true, -1) |
| 273 | if !bytes.Equal(got, want) { |
| 274 | t.Errorf("AppendDuration(%v)=\ngot: 0x%s\nwant: 0x%s", |
| 275 | dur, |
| 276 | hex.EncodeToString(got), |
| 277 | hex.EncodeToString(want)) |
| 278 | } |
| 279 | } |
| 280 | } |
| 281 | func TestAppendDurations(t *testing.T) { |
| 282 | array := make([]time.Duration, len(internal.DurTestcases)) |
| 283 | want := make([]byte, 0) |
nothing calls this directly
no test coverage detected