MCPcopy
hub / github.com/segmentio/ksuid / TestConstructionTimestamp

Function TestConstructionTimestamp

ksuid_test.go:14–22  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

12)
13
14func TestConstructionTimestamp(t *testing.T) {
15 x := New()
16 nowTime := time.Now().Round(1 * time.Minute)
17 xTime := x.Time().Round(1 * time.Minute)
18
19 if xTime != nowTime {
20 t.Fatal(xTime, "!=", nowTime)
21 }
22}
23
24func TestNil(t *testing.T) {
25 if !Nil.IsNil() {

Callers

nothing calls this directly

Calls 2

NewFunction · 0.85
TimeMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…