mirror of
https://github.com/tjboldt/ProDOS-Utilities.git
synced 2024-12-01 01:49:59 +00:00
16 lines
305 B
Go
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())
|
||
|
}
|
||
|
}
|