mirror of
https://github.com/mongodb/mongo.git
synced 2024-12-01 09:32:32 +01:00
fix assert to use ours and thus make unit test pass
This commit is contained in:
parent
326f612a98
commit
f152047f19
11
db/btree.cpp
11
db/btree.cpp
@ -20,7 +20,6 @@
|
||||
#include "db.h"
|
||||
#include "btree.h"
|
||||
#include "pdfile.h"
|
||||
#include "../util/unittest.h"
|
||||
#include "json.h"
|
||||
#include "clientcursor.h"
|
||||
#include "client.h"
|
||||
@ -38,8 +37,8 @@ namespace mongo {
|
||||
const int KeyMax = BucketSize / 10;
|
||||
|
||||
extern int otherTraceLevel;
|
||||
int split_debug = 0;
|
||||
int insert_debug = 0;
|
||||
const int split_debug = 0;
|
||||
const int insert_debug = 0;
|
||||
|
||||
/* BucketBasics --------------------------------------------------- */
|
||||
|
||||
@ -79,6 +78,12 @@ namespace mongo {
|
||||
}
|
||||
|
||||
int BucketBasics::fullValidate(const DiskLoc& thisLoc, const BSONObj &order) {
|
||||
{
|
||||
bool f = false;
|
||||
assert( f = true );
|
||||
massert("assert is misdefined", f);
|
||||
}
|
||||
|
||||
checkForInterrupt();
|
||||
assertValid(order, true);
|
||||
// if( bt_fv==0 )
|
||||
|
@ -108,9 +108,9 @@ namespace mongo {
|
||||
*/
|
||||
bool _pushBack(const DiskLoc& recordLoc, BSONObj& key, const BSONObj &order, DiskLoc prevChild);
|
||||
void pushBack(const DiskLoc& recordLoc, BSONObj& key, const BSONObj &order, DiskLoc prevChild){
|
||||
assert( _pushBack( recordLoc , key , order , prevChild ) );
|
||||
bool ok = _pushBack( recordLoc , key , order , prevChild );
|
||||
assert(ok);
|
||||
}
|
||||
//void pushBack(const DiskLoc& recordLoc, BSONObj& key, const BSONObj &order, DiskLoc prevChild, DiskLoc nextChild);
|
||||
void popBack(DiskLoc& recLoc, BSONObj& key);
|
||||
void _delKeyAtPos(int keypos); // low level version that doesn't deal with child ptrs.
|
||||
|
||||
|
@ -30,6 +30,8 @@
|
||||
|
||||
#include <pcrecpp.h>
|
||||
#include <boost/date_time/posix_time/posix_time.hpp>
|
||||
#undef assert
|
||||
#define assert xassert
|
||||
|
||||
|
||||
namespace mongo {
|
||||
|
@ -30,6 +30,8 @@
|
||||
#include "jsobjmanipulator.h"
|
||||
#include "../util/optime.h"
|
||||
#include <boost/static_assert.hpp>
|
||||
#undef assert
|
||||
#define assert xassert
|
||||
|
||||
// make sure our assumptions are valid
|
||||
BOOST_STATIC_ASSERT( sizeof(int) == 4 );
|
||||
|
@ -21,6 +21,7 @@
|
||||
#include <boost/thread/tss.hpp>
|
||||
#undef assert
|
||||
#define assert xassert
|
||||
|
||||
#include "db.h"
|
||||
#include "dbhelpers.h"
|
||||
#include "nonce.h"
|
||||
|
@ -18,9 +18,9 @@
|
||||
*/
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "../db/btree.h"
|
||||
|
||||
#include "../db/db.h"
|
||||
#include "../db/btree.h"
|
||||
|
||||
#include "dbtests.h"
|
||||
|
||||
@ -29,6 +29,12 @@ namespace BtreeTests {
|
||||
class Base {
|
||||
public:
|
||||
Base() {
|
||||
{
|
||||
bool f = false;
|
||||
assert( f = true );
|
||||
massert("assert is misdefined", f);
|
||||
}
|
||||
|
||||
setClient( ns() );
|
||||
BSONObjBuilder builder;
|
||||
builder.append( "ns", ns() );
|
||||
|
@ -18,6 +18,10 @@
|
||||
|
||||
#include "stdafx.h"
|
||||
#include <boost/program_options.hpp>
|
||||
|
||||
#undef assert
|
||||
#define assert xassert
|
||||
|
||||
#include "framework.h"
|
||||
#include "../util/file_allocator.h"
|
||||
|
||||
|
@ -7,6 +7,8 @@
|
||||
|
||||
#ifndef _WIN32
|
||||
#include <boost/date_time/posix_time/posix_time.hpp>
|
||||
#undef assert
|
||||
#define assert xassert
|
||||
#endif
|
||||
|
||||
namespace mongo {
|
||||
|
@ -20,6 +20,8 @@
|
||||
#pragma once
|
||||
|
||||
#include <boost/date_time/posix_time/posix_time.hpp>
|
||||
#undef assert
|
||||
#define assert xassert
|
||||
|
||||
namespace mongo {
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user