diff --git a/wmo/reflection_test.go b/wmo/reflection_test.go index ae227ca..889942f 100644 --- a/wmo/reflection_test.go +++ b/wmo/reflection_test.go @@ -56,6 +56,7 @@ func TestReflectionGetFieldType(t *testing.T) { Str: "3", Ptr: langext.Ptr(4), MDate: t1, + ODate: nil, } gft := func(k string) fullTypeRef { @@ -110,11 +111,11 @@ func TestReflectionGetFieldType(t *testing.T) { tst.AssertEqual(t, gft("ptr").IsPointer, true) tst.AssertEqual(t, *gfv("ptr").(*int), 4) - tst.AssertEqual(t, gft("odate").Kind.String(), "int") - tst.AssertEqual(t, gft("odate").Type.String(), "int") - tst.AssertEqual(t, gft("odate").Name, "Ptr") + tst.AssertEqual(t, gft("odate").Kind.String(), "struct") + tst.AssertEqual(t, gft("odate").Type.String(), "rfctime.RFC3339NanoTime") + tst.AssertEqual(t, gft("odate").Name, "ODate") 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) {