ProDOS-Utilities/prodos/time_test.go
2021-06-27 22:30:33 -04:00

16 lines
305 B
Go

package prodos
import (
"testing"
"time"
)
func TestDateTimeToAndFromProDOS(t *testing.T) {
now := time.Now().Round(time.Minute)
got := DateTimeFromProDOS(DateTimeToProDOS(now))
if got != now {
t.Errorf("DateTimeFromProDOS(DateTimeToProDOS(now)) = %s; want %s", got.String(), now.String())
}
}