File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ import (
10
10
"bytes"
11
11
"io"
12
12
"testing"
13
+ "time"
13
14
14
15
"github.com/google/go-cmp/cmp"
15
16
"github.com/mongodb/mongo-go-driver/bson/objectid"
@@ -823,6 +824,7 @@ func reflectionEncoderTest(t *testing.T) {
823
824
W []map [struct {}]struct {}
824
825
X []map [struct {}]struct {}
825
826
Y []map [struct {}]struct {}
827
+ Z time.Time
826
828
}{
827
829
A : []bool {true },
828
830
B : []int32 {123 },
@@ -854,6 +856,7 @@ func reflectionEncoderTest(t *testing.T) {
854
856
W : nil ,
855
857
X : []map [struct {}]struct {}{}, // Should be empty BSON Array
856
858
Y : []map [struct {}]struct {}{{}}, // Should be BSON array with one element, an empty BSON SubDocument
859
+ Z : time .Now (),
857
860
},
858
861
docToBytes (NewDocument (
859
862
EC .ArrayFromElements ("a" , VC .Boolean (true )),
@@ -880,6 +883,7 @@ func reflectionEncoderTest(t *testing.T) {
880
883
EC .Null ("w" ),
881
884
EC .Array ("x" , NewArray ()),
882
885
EC .ArrayFromElements ("y" , VC .Document (NewDocument ())),
886
+ EC .DateTime ("z" , time .Now ().UnixNano ()/ int64 (time .Millisecond )),
883
887
)),
884
888
nil ,
885
889
},
You can’t perform that action at this time.
0 commit comments