diff options
author | Benety Goh <benety@mongodb.com> | 2014-02-18 14:38:58 -0500 |
---|---|---|
committer | Benety Goh <benety@mongodb.com> | 2014-02-19 06:11:20 -0500 |
commit | 16612e609a83ebb06891e220200d4014331701cb (patch) | |
tree | c8637c0c12f07fde8748f9bc6d1ec91f771ce89d /src/mongo/dbtests/namespacetests.cpp | |
parent | 85b43895e9f54277d1b9696951fc3e7550477e74 (diff) | |
download | mongo-16612e609a83ebb06891e220200d4014331701cb.tar.gz |
SERVER-12767 refactored key generation in db/index.
Diffstat (limited to 'src/mongo/dbtests/namespacetests.cpp')
-rw-r--r-- | src/mongo/dbtests/namespacetests.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mongo/dbtests/namespacetests.cpp b/src/mongo/dbtests/namespacetests.cpp index 5635f0ebd10..1ad4f43abfb 100644 --- a/src/mongo/dbtests/namespacetests.cpp +++ b/src/mongo/dbtests/namespacetests.cpp @@ -34,7 +34,7 @@ #include "mongo/db/db.h" #include "mongo/db/index/btree_key_generator.h" -#include "mongo/db/index/hash_access_method.h" +#include "mongo/db/index/expression_key_generator.h" #include "mongo/db/index_legacy.h" #include "mongo/db/json.h" #include "mongo/db/query/internal_plans.h" @@ -986,10 +986,10 @@ namespace NamespaceTests { // Call getKeys on the nullObj. BSONObjSet nullFieldKeySet; - HashAccessMethod::getKeysImpl(nullObj, "a", 0, 0, false, &nullFieldKeySet); + getHashKeys(nullObj, "a", 0, 0, false, &nullFieldKeySet); BSONElement nullFieldFromKey = nullFieldKeySet.begin()->firstElement(); - ASSERT_EQUALS( HashAccessMethod::makeSingleKey( nullObj.firstElement(), 0, 0 ), + ASSERT_EQUALS( makeSingleHashKey( nullObj.firstElement(), 0, 0 ), nullFieldFromKey.Long() ); BSONObj missingField = IndexLegacy::getMissingField(NULL,spec); @@ -1009,10 +1009,10 @@ namespace NamespaceTests { BSONObj nullObj = BSON( "a" << BSONNULL ); BSONObjSet nullFieldKeySet; - HashAccessMethod::getKeysImpl(nullObj, "a", 0x5eed, 0, false, &nullFieldKeySet); + getHashKeys(nullObj, "a", 0x5eed, 0, false, &nullFieldKeySet); BSONElement nullFieldFromKey = nullFieldKeySet.begin()->firstElement(); - ASSERT_EQUALS( HashAccessMethod::makeSingleKey( nullObj.firstElement(), 0x5eed, 0 ), + ASSERT_EQUALS( makeSingleHashKey( nullObj.firstElement(), 0x5eed, 0 ), nullFieldFromKey.Long() ); // Ensure that getMissingField recognizes that the seed is different (and returns |