diff options
Diffstat (limited to 'dbtests/jsobjtests.cpp')
-rw-r--r-- | dbtests/jsobjtests.cpp | 33 |
1 files changed, 3 insertions, 30 deletions
diff --git a/dbtests/jsobjtests.cpp b/dbtests/jsobjtests.cpp index 8ad2154a8cb..212377f0105 100644 --- a/dbtests/jsobjtests.cpp +++ b/dbtests/jsobjtests.cpp @@ -339,8 +339,9 @@ namespace JsobjTests { } BSONObj invalid() const { BSONObj ret = valid(); - set( ret, 0, get( ret, 0 ) + 1 ); - set( ret, 7, get( ret, 7 ) + 1 ); + ASSERT_EQUALS( ret.firstElement().valuestr()[0] , 'b' ); + ASSERT_EQUALS( ret.firstElement().valuestr()[1] , 0 ); + ((char*)ret.firstElement().valuestr())[1] = 1; return ret.copy(); } }; @@ -391,32 +392,6 @@ namespace JsobjTests { }; }; - class WrongSymbolSize : public Base { - BSONObj valid() const { - return fromjson( "{\"a\":\"b\"}" ); - } - BSONObj invalid() const { - BSONObj ret = valid(); - set( ret, 4, Symbol ); - set( ret, 0, get( ret, 0 ) + 1 ); - set( ret, 7, get( ret, 7 ) + 1 ); - return ret.copy(); - } - }; - - class WrongCodeSize : public Base { - BSONObj valid() const { - return fromjson( "{\"a\":\"b\"}" ); - } - BSONObj invalid() const { - BSONObj ret = valid(); - set( ret, 4, Code ); - set( ret, 0, get( ret, 0 ) + 1 ); - set( ret, 7, get( ret, 7 ) + 1 ); - return ret.copy(); - } - }; - class NoFieldNameEnd : public Base { BSONObj valid() const { return fromjson( "{\"a\":1}" ); @@ -1248,8 +1223,6 @@ namespace JsobjTests { add< BSONObjTests::Validation::NegativeStringSize >(); add< BSONObjTests::Validation::WrongSubobjectSize >(); add< BSONObjTests::Validation::WrongDbrefNsSize >(); - add< BSONObjTests::Validation::WrongSymbolSize >(); - add< BSONObjTests::Validation::WrongCodeSize >(); add< BSONObjTests::Validation::NoFieldNameEnd >(); add< BSONObjTests::Validation::BadRegex >(); add< BSONObjTests::Validation::BadRegexOptions >(); |