@@ -740,6 +740,7 @@ func reflectionEncoderTest(t *testing.T) {
740
740
V _Interface
741
741
W map [struct {}]struct {}
742
742
X map [struct {}]struct {}
743
+ Z time.Time
743
744
}{
744
745
A : true ,
745
746
B : 123 ,
@@ -768,6 +769,7 @@ func reflectionEncoderTest(t *testing.T) {
768
769
V : _Interface ((* _impl )(nil )), // typed nil
769
770
W : map [struct {}]struct {}{},
770
771
X : nil ,
772
+ Z : now ,
771
773
},
772
774
docToBytes (NewDocument (
773
775
EC .Boolean ("a" , true ),
@@ -793,6 +795,7 @@ func reflectionEncoderTest(t *testing.T) {
793
795
EC .Null ("v" ),
794
796
EC .SubDocument ("w" , NewDocument ()),
795
797
EC .Null ("x" ),
798
+ EC .DateTime ("z" , now .UnixNano ()/ int64 (time .Millisecond )),
796
799
)),
797
800
nil ,
798
801
},
@@ -825,7 +828,7 @@ func reflectionEncoderTest(t *testing.T) {
825
828
W []map [struct {}]struct {}
826
829
X []map [struct {}]struct {}
827
830
Y []map [struct {}]struct {}
828
- Z time.Time
831
+ Z [] time.Time
829
832
}{
830
833
A : []bool {true },
831
834
B : []int32 {123 },
@@ -857,7 +860,7 @@ func reflectionEncoderTest(t *testing.T) {
857
860
W : nil ,
858
861
X : []map [struct {}]struct {}{}, // Should be empty BSON Array
859
862
Y : []map [struct {}]struct {}{{}}, // Should be BSON array with one element, an empty BSON SubDocument
860
- Z : now ,
863
+ Z : []time. Time { now , now } ,
861
864
},
862
865
docToBytes (NewDocument (
863
866
EC .ArrayFromElements ("a" , VC .Boolean (true )),
@@ -884,7 +887,7 @@ func reflectionEncoderTest(t *testing.T) {
884
887
EC .Null ("w" ),
885
888
EC .Array ("x" , NewArray ()),
886
889
EC .ArrayFromElements ("y" , VC .Document (NewDocument ())),
887
- EC .DateTime ("z" , now .UnixNano ()/ int64 (time .Millisecond )),
890
+ EC .ArrayFromElements ("z" , VC . DateTime ( now .UnixNano ()/ int64 (time .Millisecond )), VC . DateTime ( now . UnixNano () / int64 ( time . Millisecond ) )),
888
891
)),
889
892
nil ,
890
893
},
0 commit comments