From c9d513ffd36d003732e66ab468333790acefe909 Mon Sep 17 00:00:00 2001 From: Eliot Horowitz Date: Fri, 25 Sep 2009 10:56:56 -0400 Subject: [PATCH] fix framework a tiny bit --- dbtests/framework.cpp | 12 ++++++------ dbtests/framework.h | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/dbtests/framework.cpp b/dbtests/framework.cpp index 6985d03b597..069e2df1fb0 100644 --- a/dbtests/framework.cpp +++ b/dbtests/framework.cpp @@ -88,7 +88,7 @@ namespace mongo { tc->run(); passes = true; } - catch ( AssertionException * ae ){ + catch ( MyAssertionException * ae ){ err << ae->ss.str(); delete( ae ); } @@ -312,8 +312,8 @@ namespace mongo { #endif } - AssertionException * MyAsserts::getBase(){ - AssertionException * e = new AssertionException(); + MyAssertionException * MyAsserts::getBase(){ + MyAssertionException * e = new MyAssertionException(); e->ss << _file << ":" << _line << " " << _aexp << " != " << _bexp << " "; return e; } @@ -329,7 +329,7 @@ namespace mongo { printLocation(); - AssertionException * e = getBase(); + MyAssertionException * e = getBase(); e->ss << a << " != " << b << endl; log() << e->ss.str() << endl; throw e; @@ -339,10 +339,10 @@ namespace mongo { Result::cur->_asserts++; if ( a == b ) return; - + printLocation(); - AssertionException * e = getBase(); + MyAssertionException * e = getBase(); e->ss << a << " != " << b << endl; log() << e->ss.str() << endl; throw e; diff --git a/dbtests/framework.h b/dbtests/framework.h index b635e87c67a..9d7e128e1b9 100644 --- a/dbtests/framework.h +++ b/dbtests/framework.h @@ -135,9 +135,9 @@ namespace mongo { void assert_fail( const char * exp , const char * file , unsigned line ); void fail( const char * exp , const char * file , unsigned line ); - class AssertionException : boost::noncopyable { + class MyAssertionException : boost::noncopyable { public: - AssertionException(){ + MyAssertionException(){ ss << "assertion: "; } stringstream ss; @@ -159,7 +159,7 @@ namespace mongo { private: - AssertionException * getBase(); + MyAssertionException * getBase(); string _aexp; string _bexp;