We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4ac1d95 commit 109cd14Copy full SHA for 109cd14
1 file changed
src/test/org/bson/BSONTest.java
@@ -157,7 +157,6 @@ public void testUTF8(){
157
158
}
159
160
-
161
@Test
162
public void testCustomEncoders()
163
throws IOException{
@@ -306,6 +305,17 @@ else if ( o instanceof java.util.Date ) {
306
305
307
308
+ void _roundTrip( BSONObject o ){
309
+ assertEquals( o , BSON.decode( BSON.encode( o ) ) );
310
+ }
311
+
312
+ @Test
313
+ public void testRandomRoundTrips(){
314
+ _roundTrip( new BasicBSONObject( "a" , "" ) );
315
+ _roundTrip( new BasicBSONObject( "a" , "a" ) );
316
+ _roundTrip( new BasicBSONObject( "a" , "b" ) );
317
318
319
List<String> _data = new ArrayList<String>();
320
321
0 commit comments