diff options
author | Vesselina Ratcheva <vesselina.ratcheva@10gen.com> | 2018-03-13 15:38:09 -0400 |
---|---|---|
committer | Vesselina Ratcheva <vesselina.ratcheva@10gen.com> | 2018-03-13 18:57:31 -0400 |
commit | 5ab5ab20ba5aa78ceb1697eee05ddea8f6e3d94b (patch) | |
tree | 6e2b12f2b178dd41b7c373787791556af68f1992 /src/mongo/bson | |
parent | 296f242fedb66eff99861f4fa3cda1ffc552ad9d (diff) | |
download | mongo-5ab5ab20ba5aa78ceb1697eee05ddea8f6e3d94b.tar.gz |
SERVER-32144 Remove test coverage for replication protocol version 0
This reverts commit c5a4250a649ab0afb4ecdf227d4a0400f9e68786.
Diffstat (limited to 'src/mongo/bson')
-rw-r--r-- | src/mongo/bson/oid_test.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/mongo/bson/oid_test.cpp b/src/mongo/bson/oid_test.cpp index 7a0e6d6773d..8be156ae41d 100644 --- a/src/mongo/bson/oid_test.cpp +++ b/src/mongo/bson/oid_test.cpp @@ -149,4 +149,16 @@ TEST(Basic, FromStringToString) { std::string fromStr("541b1a00e8a23afa832b218e"); ASSERT_EQUALS(OID(fromStr).toString(), fromStr); } + +TEST(Basic, FromTerm) { + auto term = 7; + auto oid = OID::fromTerm(term); + + auto oidStr = oid.toString(); + auto oidHead = oidStr.substr(0, 8); + auto oidTail = oidStr.substr(oidStr.length() - 1); + + ASSERT_EQUALS("7fffffff", oidHead); + ASSERT_EQUALS(term, std::stoi(oidTail)); +} } |