diff options
author | Andy Schwerin <schwerin@mongodb.com> | 2015-05-07 16:45:29 -0400 |
---|---|---|
committer | Andy Schwerin <schwerin@mongodb.com> | 2015-05-13 17:58:55 -0400 |
commit | 532dfe1180c2da552bebed70af1e7fba34cf355c (patch) | |
tree | 9fb15c1576003307169bd249db500ad1aee21d99 /src/mongo/db/storage/key_string_test.cpp | |
parent | cd97edbe4be0e6ddc9139a21e13594fd19a26a5e (diff) | |
download | mongo-532dfe1180c2da552bebed70af1e7fba34cf355c.tar.gz |
SERVER-13874 Make mongo::Milliseconds et al. aliases for equivalent stdx::chrono types.
Also introduces operators for adding stdx::chrono::duration to Date_t,
subtracting two Date_ts to get Milliseconds, and remove the use of
reinterpret_cast from the implementation of BSON Timestamp type.
Diffstat (limited to 'src/mongo/db/storage/key_string_test.cpp')
-rw-r--r-- | src/mongo/db/storage/key_string_test.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mongo/db/storage/key_string_test.cpp b/src/mongo/db/storage/key_string_test.cpp index 267f1ba6501..e085be8fbb9 100644 --- a/src/mongo/db/storage/key_string_test.cpp +++ b/src/mongo/db/storage/key_string_test.cpp @@ -144,7 +144,7 @@ TEST(KeyStringTest, AllTypesSimple) { ROUNDTRIP(BSON("" << BSONUndefined)); ROUNDTRIP(BSON("" << OID("abcdefabcdefabcdefabcdef"))); ROUNDTRIP(BSON("" << true)); - ROUNDTRIP(BSON("" << Date_t(123123123))); + ROUNDTRIP(BSON("" << Date_t::fromMillisSinceEpoch(123123123))); ROUNDTRIP(BSON("" << BSONRegEx("asdf", "x"))); ROUNDTRIP(BSON("" << BSONDBRef("db.c", OID("010203040506070809101112")))); ROUNDTRIP(BSON("" << BSONCode("abc_code"))); @@ -420,7 +420,7 @@ const std::vector<BSONObj>& getInterestingElements() { elements.push_back(BSON("" << BSONNULL)); elements.push_back(BSON("" << BSONUndefined)); elements.push_back(BSON("" << OID("abcdefabcdefabcdefabcdef"))); - elements.push_back(BSON("" << Date_t(123))); + elements.push_back(BSON("" << Date_t::fromMillisSinceEpoch(123))); elements.push_back(BSON("" << BSONCode("abc_code"))); elements.push_back(BSON("" << BSONCode(ball))); elements.push_back(BSON("" << BSONCode(ball00n))); |