(t *testing.T)
| 251 | } |
| 252 | |
| 253 | func TestAppendDurationFloat(t *testing.T) { |
| 254 | for _, tt := range internal.DurTestcases { |
| 255 | dur := tt.Duration |
| 256 | want := []byte{} |
| 257 | want = append(want, []byte(tt.FloatOut)...) |
| 258 | got := enc.AppendDuration([]byte{}, dur, time.Microsecond, "", false, -1) |
| 259 | if !bytes.Equal(got, want) { |
| 260 | t.Errorf("AppendDuration(%v)=\ngot: 0x%s\nwant: 0x%s", |
| 261 | dur, |
| 262 | hex.EncodeToString(got), |
| 263 | hex.EncodeToString(want)) |
| 264 | } |
| 265 | } |
| 266 | } |
| 267 | func TestAppendDurationInteger(t *testing.T) { |
| 268 | for _, tt := range internal.DurTestcases { |
| 269 | dur := tt.Duration |
nothing calls this directly
no test coverage detected