summaryrefslogtreecommitdiff
path: root/dbtests/updatetests.cpp
diff options
context:
space:
mode:
authorAntonin Kral <a.kral@bobek.cz>2010-08-11 12:38:57 +0200
committerAntonin Kral <a.kral@bobek.cz>2010-08-11 12:38:57 +0200
commit7645618fd3914cb8a20561625913c20d49504a49 (patch)
tree8370f846f58f6d71165b7a0e2eda04648584ec76 /dbtests/updatetests.cpp
parent68c73c3c7608b4c87f07440dc3232801720b1168 (diff)
downloadmongodb-7645618fd3914cb8a20561625913c20d49504a49.tar.gz
Imported Upstream version 1.6.0
Diffstat (limited to 'dbtests/updatetests.cpp')
-rw-r--r--dbtests/updatetests.cpp54
1 files changed, 53 insertions, 1 deletions
diff --git a/dbtests/updatetests.cpp b/dbtests/updatetests.cpp
index 09caae6..17f861e 100644
--- a/dbtests/updatetests.cpp
+++ b/dbtests/updatetests.cpp
@@ -17,7 +17,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "stdafx.h"
+#include "pch.h"
#include "../db/query.h"
#include "../db/db.h"
@@ -678,6 +678,55 @@ namespace UpdateTests {
};
+ class inc3 : public SingleTest {
+ virtual BSONObj initial(){
+ return BSON( "_id" << 1 << "x" << 537142123123LL );
+ }
+ virtual BSONObj mod(){
+ return BSON( "$inc" << BSON( "x" << 2 ) );
+ }
+ virtual BSONObj after(){
+ return BSON( "_id" << 1 << "x" << 537142123125LL );
+ }
+ virtual const char * ns(){
+ return "unittests.inc2";
+ }
+
+ };
+
+ class inc4 : public SingleTest {
+ virtual BSONObj initial(){
+ return BSON( "_id" << 1 << "x" << 537142123123LL );
+ }
+ virtual BSONObj mod(){
+ return BSON( "$inc" << BSON( "x" << 2LL ) );
+ }
+ virtual BSONObj after(){
+ return BSON( "_id" << 1 << "x" << 537142123125LL );
+ }
+ virtual const char * ns(){
+ return "unittests.inc2";
+ }
+
+ };
+
+ class inc5 : public SingleTest {
+ virtual BSONObj initial(){
+ return BSON( "_id" << 1 << "x" << 537142123123LL );
+ }
+ virtual BSONObj mod(){
+ return BSON( "$inc" << BSON( "x" << 2.0 ) );
+ }
+ virtual BSONObj after(){
+ return BSON( "_id" << 1 << "x" << 537142123125LL );
+ }
+ virtual const char * ns(){
+ return "unittests.inc2";
+ }
+
+ };
+
+
class bit1 : public Base {
const char * ns(){
return "unittests.bit1";
@@ -775,6 +824,9 @@ namespace UpdateTests {
add< basic::inc1 >();
add< basic::inc2 >();
+ add< basic::inc3 >();
+ add< basic::inc4 >();
+ add< basic::inc5 >();
add< basic::bit1 >();
add< basic::unset >();
add< basic::setswitchint >();