diff options
author | Eliot Horowitz <eliot@10gen.com> | 2010-01-26 11:54:45 -0500 |
---|---|---|
committer | Eliot Horowitz <eliot@10gen.com> | 2010-01-26 11:54:45 -0500 |
commit | 47b67b74b4e1ec8c5adab2f132a8992a6ccc7bc6 (patch) | |
tree | c6cee58d6e731dba5bcf0d794d0a8653ac80eaec /dbtests/updatetests.cpp | |
parent | c86eda25ac2256ec595ed9979c867b46c0f1c3df (diff) | |
download | mongo-47b67b74b4e1ec8c5adab2f132a8992a6ccc7bc6.tar.gz |
fix $inc with doubles
Diffstat (limited to 'dbtests/updatetests.cpp')
-rw-r--r-- | dbtests/updatetests.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/dbtests/updatetests.cpp b/dbtests/updatetests.cpp index 60943899e71..09caae6f6d9 100644 --- a/dbtests/updatetests.cpp +++ b/dbtests/updatetests.cpp @@ -661,6 +661,22 @@ namespace UpdateTests { } }; + + class inc2 : public SingleTest { + virtual BSONObj initial(){ + return BSON( "_id" << 1 << "x" << 1 ); + } + virtual BSONObj mod(){ + return BSON( "$inc" << BSON( "x" << 2.5 ) ); + } + virtual BSONObj after(){ + return BSON( "_id" << 1 << "x" << 3.5 ); + } + virtual const char * ns(){ + return "unittests.inc2"; + } + + }; class bit1 : public Base { const char * ns(){ @@ -758,6 +774,7 @@ namespace UpdateTests { add< ModSetTests::push1 >(); add< basic::inc1 >(); + add< basic::inc2 >(); add< basic::bit1 >(); add< basic::unset >(); add< basic::setswitchint >(); |