@@ -280,7 +280,7 @@ func Test_Lte(t *testing.T) {
280280}
281281
282282func Test_Cond (t * testing.T ) {
283- assert .Equal (t , bson.D {bson.E {Key : "discount" , Value : bson.D {{Key : "$cond" , Value : []any {bson.D {{Key : "$gte" , Value : []any {"$qty" , 250 }}}, 30 , 20 }}}}}, Cond ("discount" , bsonx .D (bsonx . E ( "$gte" , []any {"$qty" , 250 }) ), 30 , 20 ))
283+ assert .Equal (t , bson.D {bson.E {Key : "discount" , Value : bson.D {{Key : "$cond" , Value : []any {bson.D {{Key : "$gte" , Value : []any {"$qty" , 250 }}}, 30 , 20 }}}}}, Cond ("discount" , bsonx .D ("$gte" , []any {"$qty" , 250 }), 30 , 20 ))
284284}
285285
286286func Test_IfNull (t * testing.T ) {
@@ -300,10 +300,10 @@ func Test_Switch(t *testing.T) {
300300 }}},
301301 Switch ("summary" , []types.CaseThen {
302302 {
303- Case : bsonx .D (bsonx . E ( "$eq" , []any {0 , 5 }) ), Then : "equals" ,
303+ Case : bsonx .D ("$eq" , []any {0 , 5 }), Then : "equals" ,
304304 },
305305 {
306- Case : bsonx .D (bsonx . E ( "$gt" , []any {0 , 5 }) ), Then : "greater than" ,
306+ Case : bsonx .D ("$gt" , []any {0 , 5 }), Then : "greater than" ,
307307 },
308308 }, "Did not match" ),
309309 )
@@ -427,15 +427,15 @@ func Test_DateToString(t *testing.T) {
427427}
428428
429429func Test_And (t * testing.T ) {
430- assert .Equal (t , bson.D {bson.E {Key : "item" , Value : bson.D {bson.E {Key : "$and" , Value : []any {bson.D {bson.E {Key : "$gt" , Value : []any {"$qty" , 100 }}}, bson.D {bson.E {Key : "$lt" , Value : []any {"$qty" , 250 }}}}}}}}, And ("item" , bsonx .D (bsonx . E ( "$gt" , []any {"$qty" , 100 })) , bsonx .D (bsonx . E ( "$lt" , []any {"$qty" , 250 }) )))
430+ assert .Equal (t , bson.D {bson.E {Key : "item" , Value : bson.D {bson.E {Key : "$and" , Value : []any {bson.D {bson.E {Key : "$gt" , Value : []any {"$qty" , 100 }}}, bson.D {bson.E {Key : "$lt" , Value : []any {"$qty" , 250 }}}}}}}}, And ("item" , bsonx .D ("$gt" , []any {"$qty" , 100 }), bsonx .D ("$lt" , []any {"$qty" , 250 })))
431431}
432432
433433func Test_Not (t * testing.T ) {
434- assert .Equal (t , bson.D {bson.E {Key : "item" , Value : bson.D {bson.E {Key : "$not" , Value : []any {bson.D {bson.E {Key : "$gt" , Value : []any {"$qty" , 250 }}}}}}}}, Not ("item" , bsonx .D (bsonx . E ( "$gt" , []any {"$qty" , 250 }) )))
434+ assert .Equal (t , bson.D {bson.E {Key : "item" , Value : bson.D {bson.E {Key : "$not" , Value : []any {bson.D {bson.E {Key : "$gt" , Value : []any {"$qty" , 250 }}}}}}}}, Not ("item" , bsonx .D ("$gt" , []any {"$qty" , 250 })))
435435}
436436
437437func Test_Or (t * testing.T ) {
438- assert .Equal (t , bson.D {bson.E {Key : "item" , Value : bson.D {bson.E {Key : "$or" , Value : []any {bson.D {bson.E {Key : "$gt" , Value : []any {"$qty" , 250 }}}, bson.D {bson.E {Key : "$lt" , Value : []any {"$qty" , 50 }}}}}}}}, Or ("item" , bsonx .D (bsonx . E ( "$gt" , []any {"$qty" , 250 })) , bsonx .D (bsonx . E ( "$lt" , []any {"$qty" , 50 }) )))
438+ assert .Equal (t , bson.D {bson.E {Key : "item" , Value : bson.D {bson.E {Key : "$or" , Value : []any {bson.D {bson.E {Key : "$gt" , Value : []any {"$qty" , 250 }}}, bson.D {bson.E {Key : "$lt" , Value : []any {"$qty" , 50 }}}}}}}}, Or ("item" , bsonx .D ("$gt" , []any {"$qty" , 250 }), bsonx .D ("$lt" , []any {"$qty" , 50 })))
439439}
440440
441441func Test_Concat (t * testing.T ) {
0 commit comments