@@ -871,6 +871,7 @@ func reflectionEncoderTest(t *testing.T) {
871
871
AA json.Number
872
872
AB * url.URL
873
873
AC decimal.Decimal128
874
+ AD * time.Time
874
875
}{
875
876
A : true ,
876
877
B : 123 ,
@@ -904,6 +905,7 @@ func reflectionEncoderTest(t *testing.T) {
904
905
AA : json .Number ("10.10" ),
905
906
AB : murl ,
906
907
AC : decimal128 ,
908
+ AD : & now ,
907
909
},
908
910
docToBytes (NewDocument (
909
911
EC .Boolean ("a" , true ),
@@ -934,6 +936,7 @@ func reflectionEncoderTest(t *testing.T) {
934
936
EC .Double ("aa" , 10.10 ),
935
937
EC .String ("ab" , murl .String ()),
936
938
EC .Decimal128 ("ac" , decimal128 ),
939
+ EC .DateTime ("ad" , now .UnixNano ()/ int64 (time .Millisecond )),
937
940
)),
938
941
nil ,
939
942
},
@@ -970,6 +973,7 @@ func reflectionEncoderTest(t *testing.T) {
970
973
AA []json.Number
971
974
AB []* url.URL
972
975
AC []decimal.Decimal128
976
+ AD []* time.Time
973
977
}{
974
978
A : []bool {true },
975
979
B : []int32 {123 },
@@ -1005,6 +1009,7 @@ func reflectionEncoderTest(t *testing.T) {
1005
1009
AA : []json.Number {json .Number ("5" ), json .Number ("10.10" )},
1006
1010
AB : []* url.URL {murl },
1007
1011
AC : []decimal.Decimal128 {decimal128 },
1012
+ AD : []* time.Time {& now , & now },
1008
1013
},
1009
1014
docToBytes (NewDocument (
1010
1015
EC .ArrayFromElements ("a" , VC .Boolean (true )),
@@ -1035,6 +1040,7 @@ func reflectionEncoderTest(t *testing.T) {
1035
1040
EC .ArrayFromElements ("aa" , VC .Int64 (5 ), VC .Double (10.10 )),
1036
1041
EC .ArrayFromElements ("ab" , VC .String (murl .String ())),
1037
1042
EC .ArrayFromElements ("ac" , VC .Decimal128 (decimal128 )),
1043
+ EC .ArrayFromElements ("ad" , VC .DateTime (now .UnixNano ()/ int64 (time .Millisecond )), VC .DateTime (now .UnixNano ()/ int64 (time .Millisecond ))),
1038
1044
)),
1039
1045
nil ,
1040
1046
},
0 commit comments