fix issues with timestamp type

This commit is contained in:
2025-06-26 17:24:28 +01:00
parent fc462031d7
commit 8dd3deb811
2 changed files with 3 additions and 3 deletions

View File

@@ -17,7 +17,7 @@ func TestT(t *testing.T) {
buf := new(bytes.Buffer)
v.Write(buf)
buf2 := bytes.NewBuffer(buf.Bytes())
v2 := New(timestamp.New())
v2 := New(timestamp.New(int64(0)))
el := v2.Read(buf2).(*T)
if el.Val.Int() != n.Int() {
t.Fatalf("expected %d got %d", n.Int(), el.Val.Int())

View File

@@ -63,7 +63,7 @@ func TestElement(t *testing.T) {
if err != nil {
t.Fatal(err)
}
var vca2 = createdat.New(timestamp.New())
var vca2 = createdat.New(timestamp.New(int64(0)))
var vs2 = serial.New(nil)
// read it in
keys.Read(b, vp2, vid2, vk2, vpk2, vca2, vs2)
@@ -110,7 +110,7 @@ func TestElement(t *testing.T) {
b := keys.Write(vca)
// check that values decoded all correctly
// we expect the following types, so we must create them:
var vca2 = createdat.New(timestamp.New())
var vca2 = createdat.New(timestamp.New(int64(0)))
// read it in
keys.Read(b, vca2)
// check they match