summaryrefslogtreecommitdiff
path: root/dbtests/namespacetests.cpp
diff options
context:
space:
mode:
authorAaron <aaron@10gen.com>2009-02-23 17:26:36 -0500
committerAaron <aaron@10gen.com>2009-02-23 17:26:36 -0500
commit13b0d2c1cf2b33898205dd5ca6b62ced9db6c5dc (patch)
tree0e3aa71f26e24c87e381e55857298feddde20ff6 /dbtests/namespacetests.cpp
parentf447474a7acc19c6bf6df2fcf1248d6188a19aea (diff)
downloadmongo-13b0d2c1cf2b33898205dd5ca6b62ced9db6c5dc.tar.gz
Index objects even if don't have a field from index spec
Diffstat (limited to 'dbtests/namespacetests.cpp')
-rw-r--r--dbtests/namespacetests.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/dbtests/namespacetests.cpp b/dbtests/namespacetests.cpp
index ba1f80e8364..4f576c9a3eb 100644
--- a/dbtests/namespacetests.cpp
+++ b/dbtests/namespacetests.cpp
@@ -366,6 +366,20 @@ namespace NamespaceTests {
return aDotB();
}
};
+
+ class MissingField : public Base {
+ public:
+ void run() {
+ create();
+ BSONObjSetDefaultOrder keys;
+ id().getKeysFromObject( BSON( "b" << 1 ), keys );
+ checkSize( 1, keys );
+ }
+ private:
+ virtual BSONObj key() const {
+ return BSON( "a" << 1 );
+ }
+ };
// TODO
// array subelement complex
@@ -569,6 +583,7 @@ namespace NamespaceTests {
add< IndexDetailsTests::ArraySubobjectMultiFieldIndex >();
add< IndexDetailsTests::ArraySubobjectSingleMissing >();
add< IndexDetailsTests::ArraySubobjectMissing >();
+ add< IndexDetailsTests::MissingField >();
add< NamespaceDetailsTests::Create >();
add< NamespaceDetailsTests::SingleAlloc >();
add< NamespaceDetailsTests::Realloc >();