summaryrefslogtreecommitdiff
path: root/src/mongo/db/hasher_test.cpp
diff options
context:
space:
mode:
authorAndy Schwerin <schwerin@mongodb.com>2015-05-07 16:45:29 -0400
committerAndy Schwerin <schwerin@mongodb.com>2015-05-13 17:58:55 -0400
commit532dfe1180c2da552bebed70af1e7fba34cf355c (patch)
tree9fb15c1576003307169bd249db500ad1aee21d99 /src/mongo/db/hasher_test.cpp
parentcd97edbe4be0e6ddc9139a21e13594fd19a26a5e (diff)
downloadmongo-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/hasher_test.cpp')
-rw-r--r--src/mongo/db/hasher_test.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mongo/db/hasher_test.cpp b/src/mongo/db/hasher_test.cpp
index 02351127c48..0966bfbf3f8 100644
--- a/src/mongo/db/hasher_test.cpp
+++ b/src/mongo/db/hasher_test.cpp
@@ -343,12 +343,12 @@ namespace {
BSONObjBuilder builder1;
BSONObjBuilder builder2;
- BSONObj o = BSON( "check" << Date_t( 0x5566778811223344LL ) );
+ BSONObj o = BSON( "check" << Date_t::fromMillisSinceEpoch( 0x5566778811223344LL ) );
ASSERT_EQUALS( hashIt( o ), 4476222765095560467LL );
o = builder1.append( "check", Timestamp(0x55667788LL, 0x11223344LL) ).obj();
ASSERT_EQUALS( hashIt( o ), 4873046866288452390LL );
- o = BSON( "check" << Date_t( 0 ) );
+ o = BSON( "check" << Date_t() );
ASSERT_EQUALS( hashIt( o ), -1178696894582842035LL );
o = builder2.appendTimestamp( "check", 0 ).obj();
ASSERT_EQUALS( hashIt( o ), -7867208682377458672LL );