summaryrefslogtreecommitdiff
path: root/src/mongo/dbtests/jsobjtests.cpp
diff options
context:
space:
mode:
authorAdam Midvidy <amidvidy@gmail.com>2014-09-19 16:43:33 -0400
committerBenety Goh <benety@mongodb.com>2014-09-19 16:50:23 -0400
commit78c5f9dd5ac65eae251df3e87175a0af076d90d9 (patch)
treee305dcd559f6b8f8a1ed987e6938e5b8406fea19 /src/mongo/dbtests/jsobjtests.cpp
parent63dd64abac9002e71348b7550234131cd01a87f5 (diff)
downloadmongo-78c5f9dd5ac65eae251df3e87175a0af076d90d9.tar.gz
SERVER-15210 SERVER-15211 remove OID undefined behavior and make it endian aware
Closes #784 Signed-off-by: Benety Goh <benety@mongodb.com>
Diffstat (limited to 'src/mongo/dbtests/jsobjtests.cpp')
-rw-r--r--src/mongo/dbtests/jsobjtests.cpp23
1 files changed, 4 insertions, 19 deletions
diff --git a/src/mongo/dbtests/jsobjtests.cpp b/src/mongo/dbtests/jsobjtests.cpp
index 2b4e7918017..23bbb7b9707 100644
--- a/src/mongo/dbtests/jsobjtests.cpp
+++ b/src/mongo/dbtests/jsobjtests.cpp
@@ -1242,7 +1242,7 @@ namespace JsobjTests {
OID b;
a.init();
- b.init( a.str() );
+ b.init( a.toString() );
ASSERT( a == b );
}
@@ -1258,9 +1258,9 @@ namespace JsobjTests {
BSONObj o = b.obj();
keyTest(o);
- ASSERT( o["a"].__oid().str() == "000000000000000000000000" );
- ASSERT( o["b"].__oid().str() == "000000000000000000000000" );
- ASSERT( o["c"].__oid().str() != "000000000000000000000000" );
+ ASSERT( o["a"].__oid().toString() == "000000000000000000000000" );
+ ASSERT( o["b"].__oid().toString() == "000000000000000000000000" );
+ ASSERT( o["c"].__oid().toString() != "000000000000000000000000" );
}
};
@@ -1316,20 +1316,6 @@ namespace JsobjTests {
}
};
- class Seq {
- public:
- void run() {
- for ( int i=0; i<10000; i++ ) {
- OID a;
- OID b;
-
- a.initSequential();
- b.initSequential();
-
- ASSERT( a < b );
- }
- }
- };
} // namespace OIDTests
@@ -2285,7 +2271,6 @@ namespace JsobjTests {
add< OIDTests::increasing >();
add< OIDTests::ToDate >();
add< OIDTests::FromDate >();
- add< OIDTests::Seq >();
add< ValueStreamTests::LabelBasic >();
add< ValueStreamTests::LabelShares >();
add< ValueStreamTests::LabelDouble >();