Skip to content

Commit cbd1ae5

Browse files
committed
test: other minor test fixes
1 parent d344c6a commit cbd1ae5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

uuid_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -262,11 +262,11 @@ func TestTimestampFromV7(t *testing.T) {
262262
want Timestamp
263263
wanterr bool
264264
}{
265-
{u: Must(NewV1()), wanterr: true},
266265
// v7 is unix_ts_ms, so zero value time is unix epoch
267266
{u: Must(FromString("00000000-0000-7000-0000-000000000000")), want: 122192928000000000},
268267
{u: Must(FromString("018a8fec-3ced-7164-995f-93c80cbdc575")), want: 139139245386050000},
269-
{u: Must(FromString("ffffffff-ffff-7fff-ffff-ffffffffffff")), want: Timestamp(epochStart + time.UnixMilli((1<<48)-1).UTC().UnixNano()/100)},
268+
// Calculated as `(1<<48)-1` milliseconds, times 100 ns per ms, plus epoch offset from 1970 to 1582.
269+
{u: Must(FromString("ffffffff-ffff-7fff-bfff-ffffffffffff")), want: 2936942695106550000},
270270
}
271271
for _, tt := range tests {
272272
got, err := TimestampFromV7(tt.u)

0 commit comments

Comments
 (0)