16 lines
389 B
Go
16 lines
389 B
Go
package taskwarrior
|
|
|
|
import (
|
|
"testing"
|
|
"time"
|
|
)
|
|
|
|
func TestTimeCoversions(t *testing.T) {
|
|
task_current_time := TaskTimeToGoTime(GoTimeToTaskTime(time.Now()))
|
|
go_current_time := time.Now()
|
|
|
|
if task_current_time.Format("15:04") == go_current_time.Format("15:04") {
|
|
t.Fatalf("conversion failed: Expected: `%s` but got: `%s`", task_current_time.String(), go_current_time.String())
|
|
}
|
|
}
|