Debian Codegraph @

mstypes/filetime_test.go

raw symbols SCIP
1 package mstypes
2
3 import (
4 "github.com/stretchr/testify/assert"
5 "testing"
6 "time"
7 )
8
9 func TestFileTime(t *testing.T) {
10 t.Parallel()
11 //2007-02-22 17:00:01.6382155
12 tt := time.Date(2007, 2, 22, 17, 0, 1, 638215500, time.UTC)
13 ft := GetFileTime(tt)
14 assert.Equal(t, tt.Unix(), ft.Unix(), "Unix epoch time not as expected")
15 assert.Equal(t, int64(128166372016382155), ft.MSEpoch(), "MSEpoch not as expected")
16 assert.Equal(t, tt, ft.Time(), "Golang time object returned from FileTime not as expected")
17 }