date test

This commit is contained in:
Hayden Parker
2016-02-04 01:14:49 -08:00
parent 4823944d59
commit f5e806dd14
2 changed files with 12 additions and 1 deletions

11
lib/common/date_test.go Normal file
View File

@ -0,0 +1,11 @@
package common
import "testing"
func TestTimeFromMiliseconds(t *testing.T) {
next_day := Date{0x00, 0x00, 0x00, 0x00, 0x05, 0x26, 0x5c, 0x00}
go_time := next_day.Time()
if go_time.Unix() != 86400 {
t.Fatal("Date.Time() did not parse time in milliseconds")
}
}