00001 #ifndef STATIC_CONTAINER_TEST_ASSERT_NEW_H 00002 00003 #define STATIC_CONTAINER_TEST_ASSERT_NEW_H 00004 00005 #include <boost/assert.hpp> 00006 #include <malloc.h> 00007 00008 bool begin_test = false; 00009 00010 void* operator new ( size_t s ) { 00011 BOOST_ASSERT( false == begin_test ); 00012 return malloc( s ); 00013 } 00014 00015 namespace static_container { 00016 namespace test { 00017 void begin() { 00018 begin_test = true; 00019 } 00020 } 00021 } 00022 00023 #endif