diff options
author | Aaron <aaron@10gen.com> | 2009-04-06 13:41:47 -0400 |
---|---|---|
committer | Aaron <aaron@10gen.com> | 2009-04-06 13:41:47 -0400 |
commit | 0b73b8d3253547d1ae4937020a8ae196b040b770 (patch) | |
tree | b5e5d7da52aa5ab0a3f3cf30942a2eca14edba6d /dbtests | |
parent | e09106351e4bbe9d89156fce156d34c8607c95eb (diff) | |
download | mongo-0b73b8d3253547d1ae4937020a8ae196b040b770.tar.gz |
array elt may not contain referenced subobject
Diffstat (limited to 'dbtests')
-rw-r--r-- | dbtests/namespacetests.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/dbtests/namespacetests.cpp b/dbtests/namespacetests.cpp index 4f576c9a3eb..c120fedcd9a 100644 --- a/dbtests/namespacetests.cpp +++ b/dbtests/namespacetests.cpp @@ -381,6 +381,20 @@ namespace NamespaceTests { } }; + class SubobjectMissing : public Base { + public: + void run() { + create(); + BSONObjSetDefaultOrder keys; + id().getKeysFromObject( fromjson( "{a:[1,2]}" ), keys ); + checkSize( 0, keys ); + } + private: + virtual BSONObj key() const { + return aDotB(); + } + }; + // TODO // array subelement complex // parallel arrays complex @@ -584,6 +598,7 @@ namespace NamespaceTests { add< IndexDetailsTests::ArraySubobjectSingleMissing >(); add< IndexDetailsTests::ArraySubobjectMissing >(); add< IndexDetailsTests::MissingField >(); + add< IndexDetailsTests::SubobjectMissing >(); add< NamespaceDetailsTests::Create >(); add< NamespaceDetailsTests::SingleAlloc >(); add< NamespaceDetailsTests::Realloc >(); |