File tree Expand file tree Collapse file tree 2 files changed +4
-7
lines changed
commons-mongo/jvm/src/test/scala/com/avsystem/commons/mongo Expand file tree Collapse file tree 2 files changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -194,9 +194,9 @@ class BsonInputOutputTest extends AnyFunSuite with ScalaCheckPropertyChecks {
194194
195195
196196 def testMetadata (input : BsonInput )(implicit position : Position ): Unit = {
197- def testFieldType (input : ObjectInput )(tpe : BsonType ): Unit = {
197+ def testFieldType (input : ObjectInput )(tpes : BsonType * ): Unit = {
198198 val fieldInput = input.nextField()
199- assert(fieldInput.readMetadata(BsonTypeMetadata ).contains(tpe ))
199+ assert(fieldInput.readMetadata(BsonTypeMetadata ).exists(tpes.contains ))
200200 fieldInput.skip()
201201 }
202202
@@ -217,7 +217,7 @@ class BsonInputOutputTest extends AnyFunSuite with ScalaCheckPropertyChecks {
217217 testFieldType(objectInput)(BsonType .STRING )
218218 testFieldType(objectInput)(BsonType .BOOLEAN )
219219 testFieldType(objectInput)(BsonType .INT32 )
220- testFieldType(objectInput)(BsonType .INT64 )
220+ testFieldType(objectInput)(BsonType .INT32 , BsonType . INT64 )
221221 testFieldType(objectInput)(BsonType .DATE_TIME )
222222 testFieldType(objectInput)(BsonType .DOUBLE )
223223 testFieldType(objectInput)(BsonType .BINARY )
Original file line number Diff line number Diff line change @@ -33,10 +33,7 @@ object SomethingPlain extends HasGenCodec[SomethingPlain] {
3333 string <- arbitrary[String ]
3434 boolean <- arbitrary[Boolean ]
3535 int <- arbitrary[Int ]
36- long <- Gen .oneOf(
37- Gen .choose(Long .MinValue , Int .MinValue - 1L ),
38- Gen .choose(Int .MaxValue + 1L , Long .MaxValue ),
39- )
36+ long <- arbitrary[Long ]
4037 timestamp <- arbitrary[JDate ]
4138 double <- arbitrary[Double ]
4239 binary <- Gen .buildableOf[Array [Byte ], Byte ](arbitrary[Byte ]).map(new Bytes (_))
You can’t perform that action at this time.
0 commit comments