fix tests
All checks were successful
Build Docker and Deploy / Run goext test-suite (push) Successful in 2m23s

This commit is contained in:
2025-11-06 09:54:28 +01:00
parent dce6f634b1
commit 69f2dd73c5

View File

@@ -56,6 +56,7 @@ func TestReflectionGetFieldType(t *testing.T) {
Str: "3", Str: "3",
Ptr: langext.Ptr(4), Ptr: langext.Ptr(4),
MDate: t1, MDate: t1,
ODate: nil,
} }
gft := func(k string) fullTypeRef { gft := func(k string) fullTypeRef {
@@ -110,11 +111,11 @@ func TestReflectionGetFieldType(t *testing.T) {
tst.AssertEqual(t, gft("ptr").IsPointer, true) tst.AssertEqual(t, gft("ptr").IsPointer, true)
tst.AssertEqual(t, *gfv("ptr").(*int), 4) tst.AssertEqual(t, *gfv("ptr").(*int), 4)
tst.AssertEqual(t, gft("odate").Kind.String(), "int") tst.AssertEqual(t, gft("odate").Kind.String(), "struct")
tst.AssertEqual(t, gft("odate").Type.String(), "int") tst.AssertEqual(t, gft("odate").Type.String(), "rfctime.RFC3339NanoTime")
tst.AssertEqual(t, gft("odate").Name, "Ptr") tst.AssertEqual(t, gft("odate").Name, "ODate")
tst.AssertEqual(t, gft("odate").IsPointer, true) tst.AssertEqual(t, gft("odate").IsPointer, true)
tst.AssertEqual(t, *gfv("odate").(*int), 4) tst.AssertEqual(t, gfv("odate").(*rfctime.RFC3339NanoTime), nil)
} }
func TestReflectionGetTokenValueAsMongoType(t *testing.T) { func TestReflectionGetTokenValueAsMongoType(t *testing.T) {