github.com/keybase/client/go@v0.0.0-20240309051027-028f7c731f8b/kbfs/dokan/dokan_test.go (about)

     1  // Copyright 2016 Keybase Inc. All rights reserved.
     2  // Use of this source code is governed by a BSD
     3  // license that can be found in the LICENSE file.
     4  
     5  //go:build windows
     6  // +build windows
     7  
     8  package dokan
     9  
    10  import (
    11  	"testing"
    12  	"time"
    13  )
    14  
    15  func testTimePacking(t *testing.T, t0 time.Time) {
    16  	t1 := unpackTime(packTime(t0))
    17  	if !t0.Equal(t1) {
    18  		t.Fatalf("Time pack+unpack not equal with original: %v => %v", t0, t1)
    19  	}
    20  }
    21  
    22  func TestTimePacking(t *testing.T) {
    23  	testTimePacking(t, time.Time{})
    24  	testTimePacking(t, time.Now())
    25  	testTimePacking(t, time.Unix(0, 0))
    26  }
    27  
    28  func TestCtxAlloc(t *testing.T) {
    29  	ctx := allocCtx(0)
    30  	ctx.Free()
    31  }