~chrisppy/go-barefeed

ref: e76763008dc2b1750154fb00285056605c882e40 go-barefeed/time_test.go -rw-r--r-- 221 bytes
e7676300Chris Palmer fix textType 4 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
package barefeed

import (
	"testing"
	"time"
)

func TestTimestamp(t *testing.T) {
	ts := Timestamp(time.Now().UTC().Unix())
	tm := ts.Time()
	if ts != ToTimestamp(tm) {
		t.Errorf("Expected %v, actual %v", ts, tm)
	}
}