This repository has been archived on 2025-10-30. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
gitwarrior/internal/taskwarrior/task_test.go

19 lines
502 B
Go

package taskwarrior
import (
"testing"
"time"
)
func TestTimeCoversions(t *testing.T) {
current_time := time.Now()
task_current_time := GoTimeToTaskTime(current_time)
go_current_time := TaskTimeToGoTime(task_current_time)
task_current_time = GoTimeToTaskTime(go_current_time)
current_time = TaskTimeToGoTime(task_current_time)
if current_time.Compare(go_current_time) != 0 {
t.Fatalf("conversion failed: Expected: `%s` but got: `%s`", current_time.String(), go_current_time.String())
}
}