diff options
author | Aaron <aaron@10gen.com> | 2009-03-26 17:34:19 -0400 |
---|---|---|
committer | Aaron <aaron@10gen.com> | 2009-03-26 17:34:19 -0400 |
commit | c3e08b28a5bb133d009889dd6501bf5c4b9bf756 (patch) | |
tree | d7b1ae0c05d2ff001d6b83e0a77368a66871a29d /dbtests/updatetests.cpp | |
parent | bd99770027cc35725fa56249ba95c164de181df8 (diff) | |
download | mongo-c3e08b28a5bb133d009889dd6501bf5c4b9bf756.tar.gz |
Don't double-increment 'left'
Diffstat (limited to 'dbtests/updatetests.cpp')
-rw-r--r-- | dbtests/updatetests.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/dbtests/updatetests.cpp b/dbtests/updatetests.cpp index 5d00f44ce5f..b4e76d4a4cf 100644 --- a/dbtests/updatetests.cpp +++ b/dbtests/updatetests.cpp @@ -373,6 +373,15 @@ namespace UpdateTests { } }; + class SetEncapsulationConflictsWithExistingType : public SetBase { + public: + void run() { + client().insert( ns(), fromjson( "{'_id':0,a:{b:4}}" ) ); + client().update( ns(), Query(), BSON( "$set" << BSON( "a.b.c" << 4.0 ) ) ); + ASSERT( client().findOne( ns(), Query() ).woCompare( fromjson( "{'_id':0,a:{b:4}}" ) ) == 0 ); + } + }; + class All : public UnitTest::Suite { public: All() { @@ -411,6 +420,7 @@ namespace UpdateTests { add< PushInsideNothing >(); add< CantPushInsideOtherMod >(); add< CantPushTwice >(); + add< SetEncapsulationConflictsWithExistingType >(); } }; |