123456789101112131415161718192021222324252627282930313233343536373839 |
- package util
- import (
- "testing"
- "github.com/stretchr/testify/assert"
- )
- func TestUtil_ConvertParseLocalUnix(t *testing.T) {
- type args struct {
- unix int64
- }
- tests := []struct {
- Name string
- Args args
- }{
- {
- Name: "08:00:00",
- Args: args{
- unix: 1727049600,
- },
- },
- {
- Name: "09:00:00",
- Args: args{
- unix: 1727053200,
- },
- },
- }
- for _, tt := range tests {
- t.Run(tt.Name, func(t *testing.T) {
- got, err := ConvertParseLocalUnix(tt.Name)
- assert.Nil(t, err)
- assert.Equal(t, tt.Args.unix, got)
- })
- }
- }
|