123456789101112131415 |
- package timeutil
- import (
- "testing"
- "github.com/stretchr/testify/assert"
- )
- func TestSecondsToTime(t *testing.T) {
- assert.Equal(t, "00:00:12", SecondsToTime(12))
- assert.Equal(t, "00:01:00", SecondsToTime(60))
- assert.Equal(t, "00:30:00", SecondsToTime(1800))
- assert.Equal(t, "01:00:01", SecondsToTime(3601))
- assert.Equal(t, "01:30:01", SecondsToTime(5401))
- }
|