Thread: [Mockpp-commits] mockpp/mockpp ChainableMockObject.cpp,1.18,1.19 ChainableMockObject.h,1.29,1.30 Exp
Brought to you by:
ewald-arnold
Update of /cvsroot/mockpp/mockpp/mockpp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21172/mockpp Modified Files: ChainableMockObject.cpp ChainableMockObject.h ExpectationConglomeration.h ExpectationList.h ExpectationMap.h ExpectationSet.h MockObject.cpp MockObject.h mockpp.cpp mockpp.h ResponseVector1.h ResponseVector2.h ResponseVector3.h ResponseVector4.h ResponseVector5.h ResponseVector6.h ReturnObjectList.h ThrowableList.h TrackingCounter.cpp TrackingCounter.h VerifiableList.cpp VerifiableList.h VerifyingTestCaller.h VerifyingTestCase.cpp VerifyingTestCase.h VisitableMockMethod.cpp VisitableMockMethod.h VisitableMockObject.cpp VisitableMockObject.h VisitableMockObject_macro.h VisitableMockObject_template.h Log Message: prepare use of alternative stl Index: ResponseVector3.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/ResponseVector3.h,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- ResponseVector3.h 13 Nov 2005 11:53:18 -0000 1.7 +++ ResponseVector3.h 26 Nov 2005 18:00:17 -0000 1.8 @@ -150,9 +150,9 @@ protected: - std::vector<Constraint<P1>*> t1vec; - std::vector<Constraint<P2>*> t2vec; - std::vector<Constraint<P3>*> t3vec; + MOCKPP_STL::vector<Constraint<P1>*> t1vec; + MOCKPP_STL::vector<Constraint<P2>*> t2vec; + MOCKPP_STL::vector<Constraint<P3>*> t3vec; }; @@ -283,7 +283,7 @@ private: - std::vector<R> rvec; + MOCKPP_STL::vector<R> rvec; }; } // ns mockpp Index: TrackingCounter.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/TrackingCounter.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- TrackingCounter.cpp 13 Nov 2005 11:53:18 -0000 1.10 +++ TrackingCounter.cpp 26 Nov 2005 18:00:17 -0000 1.11 @@ -29,7 +29,7 @@ #include <mockpp/mockpp.h> // always first -#include <algorithm> +#include MOCKPP_ALGORITHM_H #include <mockpp/TrackingCounter.h> #include <mockpp/VerifiableList.h> @@ -162,8 +162,8 @@ void MOCKPP_EXPORT TrackingCounterMaster::removeClient(TrackingCounterClient* vf) { - std::vector<TrackingCounterClient*>::iterator it = - std::find (clients.begin(), clients.end(), vf); + MOCKPP_STL::vector<TrackingCounterClient*>::iterator it = + MOCKPP_STL::find (clients.begin(), clients.end(), vf); if(it != clients.end()) clients.erase(it); Index: ResponseVector2.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/ResponseVector2.h,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- ResponseVector2.h 13 Nov 2005 11:53:18 -0000 1.7 +++ ResponseVector2.h 26 Nov 2005 18:00:17 -0000 1.8 @@ -138,8 +138,8 @@ protected: - std::vector<Constraint<P1>*> t1vec; - std::vector<Constraint<P2>*> t2vec; + MOCKPP_STL::vector<Constraint<P1>*> t1vec; + MOCKPP_STL::vector<Constraint<P2>*> t2vec; }; @@ -262,7 +262,7 @@ private: - std::vector<R> rvec; + MOCKPP_STL::vector<R> rvec; }; } // ns mockpp Index: VisitableMockObject_macro.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/VisitableMockObject_macro.h,v retrieving revision 1.34 retrieving revision 1.35 diff -u -d -r1.34 -r1.35 --- VisitableMockObject_macro.h 13 Nov 2005 11:53:18 -0000 1.34 +++ VisitableMockObject_macro.h 26 Nov 2005 18:00:17 -0000 1.35 @@ -588,7 +588,7 @@ mockpp::ThrowableItem name ## DefaultThrowable; \ mutable mockpp::ThrowableList name ## Throwables; \ bool name ## ThrowablesInline; \ - mutable std::vector<bool> name ## ThrowableInsteadReturn + mutable MOCKPP_STL::vector<bool> name ## ThrowableInsteadReturn #define MOCKPP_DECLARE_RETURN_VARS(ret_type, name) \ mutable mockpp::ReturnObjectList< ret_type > name ## ReturnValues; \ @@ -688,7 +688,7 @@ */ #define MOCKPP_VOID_VISITABLE0_IMPL(classname, m_name) \ { \ - std::string func_name (#m_name); \ + MOCKPP_STL::string func_name (#m_name); \ if (!isActivated() ) \ { \ addExpectedMethod(mockpp::getLatin1(getVerifiableName()) + "." + func_name); \ @@ -718,7 +718,7 @@ #define MOCKPP_VOID_VISITABLE1_IMPL(classname, m_name, m_type1, \ a_name, v_type1) \ { \ - std::string func_name (#m_name); \ + MOCKPP_STL::string func_name (#m_name); \ if (!isActivated() ) \ { \ addExpectedMethod(mockpp::getLatin1(getVerifiableName()) + "." + func_name); \ @@ -768,7 +768,7 @@ #define MOCKPP_VOID_VISITABLE2_IMPL(classname, m_name, m_type1, m_type2, \ a_name, v_type1, v_type2) \ { \ - std::string func_name (#m_name); \ + MOCKPP_STL::string func_name (#m_name); \ if (!isActivated() ) \ { \ addExpectedMethod(mockpp::getLatin1(getVerifiableName()) + "." + func_name); \ @@ -825,7 +825,7 @@ #define MOCKPP_VOID_VISITABLE3_IMPL(classname, m_name, m_type1, m_type2, m_type3, \ a_name, v_type1, v_type2, v_type3) \ { \ - std::string func_name (#m_name); \ + MOCKPP_STL::string func_name (#m_name); \ if (!isActivated() ) \ { \ addExpectedMethod(mockpp::getLatin1(getVerifiableName()) + "." + func_name); \ @@ -889,7 +889,7 @@ #define MOCKPP_VOID_VISITABLE4_IMPL(classname, m_name, m_type1, m_type2, m_type3, m_type4, \ a_name, v_type1, v_type2, v_type3, v_type4) \ { \ - std::string func_name (#m_name); \ + MOCKPP_STL::string func_name (#m_name); \ if (!isActivated() ) \ { \ addExpectedMethod(mockpp::getLatin1(getVerifiableName()) + "." + func_name); \ @@ -960,7 +960,7 @@ #define MOCKPP_VOID_VISITABLE5_IMPL(classname, m_name, m_type1, m_type2, m_type3, m_type4, m_type5, \ a_name, v_type1, v_type2, v_type3, v_type4, v_type5) \ { \ - std::string func_name (#m_name); \ + MOCKPP_STL::string func_name (#m_name); \ if (!isActivated() ) \ { \ addExpectedMethod(mockpp::getLatin1(getVerifiableName()) + "." + func_name); \ @@ -1027,7 +1027,7 @@ #define MOCKPP_VISITABLE0_IMPL(classname, m_ret_type, m_name, \ v_ret_type) \ { \ - std::string func_name = #m_name; \ + MOCKPP_STL::string func_name = #m_name; \ if (!isActivated() ) \ { \ addExpectedMethod(mockpp::getLatin1(getVerifiableName()) + "." + func_name); \ @@ -1067,7 +1067,7 @@ #define MOCKPP_VISITABLE1_IMPL(classname, m_ret_type, m_name, m_type1, \ v_ret_type, a_name, v_type1) \ { \ - std::string func_name = #m_name; \ + MOCKPP_STL::string func_name = #m_name; \ if (!isActivated() ) \ { \ addExpectedMethod(mockpp::getLatin1(getVerifiableName()) + "." + func_name); \ @@ -1130,7 +1130,7 @@ #define MOCKPP_VISITABLE2_IMPL(classname, m_ret_type, m_name, m_type1, m_type2, \ v_ret_type, a_name, v_type1, v_type2) \ { \ - std::string func_name = #m_name; \ + MOCKPP_STL::string func_name = #m_name; \ if (!isActivated() ) \ { \ addExpectedMethod(mockpp::getLatin1(getVerifiableName()) + "." + func_name); \ @@ -1200,7 +1200,7 @@ #define MOCKPP_VISITABLE3_IMPL(classname, m_ret_type, m_name, m_type1, m_type2, m_type3, \ v_ret_type, a_name, v_type1, v_type2, v_type3) \ { \ - std::string func_name = #m_name; \ + MOCKPP_STL::string func_name = #m_name; \ if (!isActivated() ) \ { \ addExpectedMethod(mockpp::getLatin1(getVerifiableName()) + "." + func_name); \ @@ -1276,7 +1276,7 @@ #define MOCKPP_VISITABLE4_IMPL(classname, m_ret_type, m_name, m_type1, m_type2, m_type3, m_type4, \ v_ret_type, a_name, v_type1, v_type2, v_type3, v_type4) \ { \ - std::string func_name = #m_name; \ + MOCKPP_STL::string func_name = #m_name; \ if (!isActivated() ) \ { \ addExpectedMethod(mockpp::getLatin1(getVerifiableName()) + "." + func_name); \ @@ -1359,7 +1359,7 @@ #define MOCKPP_VISITABLE5_IMPL(classname, m_ret_type, m_name, m_type1, m_type2, m_type3, m_type4, m_type5, \ v_ret_type, a_name, v_type1, v_type2, v_type3, v_type4, v_type5) \ { \ - std::string func_name = #m_name; \ + MOCKPP_STL::string func_name = #m_name; \ if (!isActivated() ) \ { \ addExpectedMethod(mockpp::getLatin1(getVerifiableName()) + "." + func_name); \ Index: ExpectationSet.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/ExpectationSet.h,v retrieving revision 1.33 retrieving revision 1.34 diff -u -d -r1.33 -r1.34 --- ExpectationSet.h 13 Nov 2005 11:53:18 -0000 1.33 +++ ExpectationSet.h 26 Nov 2005 18:00:16 -0000 1.34 @@ -32,8 +32,8 @@ #include <mockpp/mockpp.h> // always first -#include <algorithm> -#include <set> +#include MOCKPP_ALGORITHM_H +#include MOCKPP_SET_H #include <mockpp/AbstractExpectationCollection.h> #include <mockpp/util/AssertMo.h> @@ -216,13 +216,13 @@ fmt << getVerifiableName() << actualItem; MOCKPP_ASSERT_TRUE_MESSAGE(fmt, - std::find(expectedItems.begin(), expectedItems.end(), actualItem) != expectedItems.end()); + MOCKPP_STL::find(expectedItems.begin(), expectedItems.end(), actualItem) != expectedItems.end()); } private: - std::set<T> actualItems; - std::set<T> expectedItems; + MOCKPP_STL::set<T> actualItems; + MOCKPP_STL::set<T> expectedItems; bool expectNothing; bool haveActualValue; }; Index: ResponseVector4.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/ResponseVector4.h,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- ResponseVector4.h 13 Nov 2005 11:53:18 -0000 1.7 +++ ResponseVector4.h 26 Nov 2005 18:00:17 -0000 1.8 @@ -162,10 +162,10 @@ protected: - std::vector<Constraint<P1>*> t1vec; - std::vector<Constraint<P2>*> t2vec; - std::vector<Constraint<P3>*> t3vec; - std::vector<Constraint<P4>*> t4vec; + MOCKPP_STL::vector<Constraint<P1>*> t1vec; + MOCKPP_STL::vector<Constraint<P2>*> t2vec; + MOCKPP_STL::vector<Constraint<P3>*> t3vec; + MOCKPP_STL::vector<Constraint<P4>*> t4vec; }; @@ -304,7 +304,7 @@ private: - std::vector<R> rvec; + MOCKPP_STL::vector<R> rvec; }; } // ns mockpp Index: VerifyingTestCase.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/VerifyingTestCase.h,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- VerifyingTestCase.h 6 Apr 2005 20:15:19 -0000 1.20 +++ VerifyingTestCase.h 26 Nov 2005 18:00:17 -0000 1.21 @@ -66,7 +66,7 @@ /** Constructs the test case. * @param name test case name */ - VerifyingTestCase( const std::string &name ); + VerifyingTestCase( const MOCKPP_STL::string &name ); /** Constructs the test case. */ @@ -96,7 +96,7 @@ VerifyingTestCase (const VerifyingTestCase &); // forbid VerifyingTestCase& operator=(VerifyingTestCase&); - std::vector<Verifiable*> registeredVerifiables; + MOCKPP_STL::vector<Verifiable*> registeredVerifiables; }; Index: VerifyingTestCase.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/VerifyingTestCase.cpp,v retrieving revision 1.24 retrieving revision 1.25 diff -u -d -r1.24 -r1.25 --- VerifyingTestCase.cpp 28 Aug 2005 20:40:23 -0000 1.24 +++ VerifyingTestCase.cpp 26 Nov 2005 18:00:17 -0000 1.25 @@ -57,7 +57,7 @@ MOCKPP_EXPORT -VerifyingTestCase::VerifyingTestCase( const std::string &name) +VerifyingTestCase::VerifyingTestCase( const MOCKPP_STL::string &name) : CppUnit::TestCase(name) , MockObject(MOCKPP_PCHAR("VerifyingTestCase/")+MOCKPP_GET_STRING(name), 0) { Index: ChainableMockObject.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/ChainableMockObject.cpp,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- ChainableMockObject.cpp 13 Nov 2005 11:53:18 -0000 1.18 +++ ChainableMockObject.cpp 26 Nov 2005 18:00:16 -0000 1.19 @@ -30,7 +30,7 @@ #include <mockpp/mockpp.h> // always first -#include <algorithm> +#include MOCKPP_ALGORITHM_H #include <mockpp/ChainableMockObject.h> @@ -107,13 +107,13 @@ void MOCKPP_EXPORT ChainableMockObjectBase::addPendingRecorder(const String &id, InvokedRecorder::AP recorder) { - pendingRecorders.insert( std::make_pair(id, recorder.release()) ); + pendingRecorders.insert( MOCKPP_STL::make_pair(id, recorder.release()) ); } void MOCKPP_EXPORT ChainableMockObjectBase::storeID( const String &id, MatchBuilderAdapterBase *builder ) { - idTable.insert( std::make_pair(id, builder) ); + idTable.insert( MOCKPP_STL::make_pair(id, builder) ); PendingType::iterator it; while ( (it = pendingRecorders.find( id )) != pendingRecorders.end() ) Index: ChainableMockObject.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/ChainableMockObject.h,v retrieving revision 1.29 retrieving revision 1.30 diff -u -d -r1.29 -r1.30 --- ChainableMockObject.h 13 Nov 2005 11:53:18 -0000 1.29 +++ ChainableMockObject.h 26 Nov 2005 18:00:16 -0000 1.30 @@ -55,7 +55,7 @@ */ class ChainableMockObjectBase : public BuilderNamespace { - typedef std::map<String, MatchBuilderAdapterBase*> TableType; + typedef MOCKPP_STL::map<String, MatchBuilderAdapterBase*> TableType; typedef std::multimap<String, InvokedRecorder*> PendingType; public: @@ -133,7 +133,7 @@ ChainableMockObjectBase (const ChainableMockObjectBase &); // forbid ChainableMockObjectBase& operator=(ChainableMockObjectBase&); - std::vector<MatchBuilderAdapterBase*> allBuilders; + MOCKPP_STL::vector<MatchBuilderAdapterBase*> allBuilders; TableType idTable; mutable PendingType pendingRecorders; }; Index: MockObject.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/MockObject.h,v retrieving revision 1.22 retrieving revision 1.23 diff -u -d -r1.22 -r1.23 --- MockObject.h 29 Oct 2005 21:00:26 -0000 1.22 +++ MockObject.h 26 Nov 2005 18:00:16 -0000 1.23 @@ -77,7 +77,7 @@ MockObject (const MockObject &); // forbid MockObject& operator=(MockObject&); - typedef std::vector<const Verifiable*> VerifierVec; + typedef MOCKPP_STL::vector<const Verifiable*> VerifierVec; /** * Verifies all the fields of type Verifiable in the given object, including Index: VisitableMockMethod.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/VisitableMockMethod.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- VisitableMockMethod.cpp 18 Nov 2005 10:20:00 -0000 1.6 +++ VisitableMockMethod.cpp 26 Nov 2005 18:00:17 -0000 1.7 @@ -56,7 +56,7 @@ } -std::string MOCKPP_EXPORT VisitableMockMethodBase::getMethodIdentifier() const +MOCKPP_STL::string MOCKPP_EXPORT VisitableMockMethodBase::getMethodIdentifier() const { return getLatin1(getMethodName()); } Index: VerifiableList.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/VerifiableList.cpp,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- VerifiableList.cpp 27 Feb 2005 11:48:14 -0000 1.18 +++ VerifiableList.cpp 26 Nov 2005 18:00:17 -0000 1.19 @@ -31,7 +31,7 @@ #include <mockpp/mockpp.h> // always first -#include <algorithm> +#include MOCKPP_ALGORITHM_H #include <mockpp/VerifiableList.h> #include <mockpp/compat/Assert.h> @@ -55,8 +55,8 @@ void MOCKPP_EXPORT VerifiableList::removeVerifiable (Verifiable* vf) { - std::vector<Verifiable*>::iterator it = - std::find (verifiables.begin(), verifiables.end(), vf); + MOCKPP_STL::vector<Verifiable*>::iterator it = + MOCKPP_STL::find (verifiables.begin(), verifiables.end(), vf); if(it != verifiables.end()) verifiables.erase(it); @@ -65,8 +65,8 @@ bool MOCKPP_EXPORT VerifiableList::hasVerifiable (Verifiable* vf) const { - std::vector<Verifiable*>::const_iterator it = - std::find(verifiables.begin(), verifiables.end(), vf); + MOCKPP_STL::vector<Verifiable*>::const_iterator it = + MOCKPP_STL::find(verifiables.begin(), verifiables.end(), vf); return it != verifiables.end(); } Index: VerifyingTestCaller.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/VerifyingTestCaller.h,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- VerifyingTestCaller.h 3 Apr 2005 18:32:45 -0000 1.9 +++ VerifyingTestCaller.h 26 Nov 2005 18:00:17 -0000 1.10 @@ -64,7 +64,7 @@ * \param test the method this VerifyingTestCaller calls in runTest() * \param fixture the Fixture to invoke the test method on. */ - VerifyingTestCaller(const std::string &name, + VerifyingTestCaller(const MOCKPP_STL::string &name, TestCaseMethod test, VerifyingFixtureType& fixture) : ::CppUnit::TestCaller<VerifyingFixtureType>(name, test, fixture) @@ -80,7 +80,7 @@ * \param test the method this VerifyingTestCaller calls in runTest() * \param fixture the Fixture to invoke the test method on. */ - VerifyingTestCaller(const std::string &name, + VerifyingTestCaller(const MOCKPP_STL::string &name, TestCaseMethod test, VerifyingFixtureType* fixture) : ::CppUnit::TestCaller<VerifyingFixtureType>(name, test, fixture) @@ -110,7 +110,7 @@ /** Returns the the callers string representation. */ - std::string toString() const + MOCKPP_STL::string toString() const { return "VerifyingTestCaller " + this->getName(); } Index: ThrowableList.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/ThrowableList.h,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- ThrowableList.h 13 Nov 2005 11:53:18 -0000 1.20 +++ ThrowableList.h 26 Nov 2005 18:00:17 -0000 1.21 @@ -32,7 +32,7 @@ #include <mockpp/mockpp.h> // always first -#include <deque> +#include MOCKPP_DEQUE_H #include <mockpp/Verifiable.h> #include <mockpp/Throwable.h> Index: ResponseVector5.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/ResponseVector5.h,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- ResponseVector5.h 13 Nov 2005 11:53:18 -0000 1.7 +++ ResponseVector5.h 26 Nov 2005 18:00:17 -0000 1.8 @@ -174,11 +174,11 @@ protected: - std::vector<Constraint<P1>*> t1vec; - std::vector<Constraint<P2>*> t2vec; - std::vector<Constraint<P3>*> t3vec; - std::vector<Constraint<P4>*> t4vec; - std::vector<Constraint<P5>*> t5vec; + MOCKPP_STL::vector<Constraint<P1>*> t1vec; + MOCKPP_STL::vector<Constraint<P2>*> t2vec; + MOCKPP_STL::vector<Constraint<P3>*> t3vec; + MOCKPP_STL::vector<Constraint<P4>*> t4vec; + MOCKPP_STL::vector<Constraint<P5>*> t5vec; }; @@ -325,7 +325,7 @@ private: - std::vector<R> rvec; + MOCKPP_STL::vector<R> rvec; }; } // ns mockpp Index: ExpectationList.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/ExpectationList.h,v retrieving revision 1.39 retrieving revision 1.40 diff -u -d -r1.39 -r1.40 --- ExpectationList.h 13 Nov 2005 11:53:18 -0000 1.39 +++ ExpectationList.h 26 Nov 2005 18:00:16 -0000 1.40 @@ -32,8 +32,8 @@ #include <mockpp/mockpp.h> // always first -#include <algorithm> -#include <vector> +#include MOCKPP_ALGORITHM_H +#include MOCKPP_VECTOR_H #include <mockpp/AbstractExpectationCollection.h> #include <mockpp/util/AssertMo.h> @@ -241,8 +241,8 @@ private: - std::vector<T> actualItems; - std::vector<T> expectedItems; + MOCKPP_STL::vector<T> actualItems; + MOCKPP_STL::vector<T> expectedItems; bool expectNothing; bool haveActualValue; }; Index: ResponseVector6.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/ResponseVector6.h,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- ResponseVector6.h 13 Nov 2005 11:53:18 -0000 1.5 +++ ResponseVector6.h 26 Nov 2005 18:00:17 -0000 1.6 @@ -186,12 +186,12 @@ protected: - std::vector<Constraint<P1>*> t1vec; - std::vector<Constraint<P2>*> t2vec; - std::vector<Constraint<P3>*> t3vec; - std::vector<Constraint<P4>*> t4vec; - std::vector<Constraint<P5>*> t5vec; - std::vector<Constraint<P6>*> t6vec; + MOCKPP_STL::vector<Constraint<P1>*> t1vec; + MOCKPP_STL::vector<Constraint<P2>*> t2vec; + MOCKPP_STL::vector<Constraint<P3>*> t3vec; + MOCKPP_STL::vector<Constraint<P4>*> t4vec; + MOCKPP_STL::vector<Constraint<P5>*> t5vec; + MOCKPP_STL::vector<Constraint<P6>*> t6vec; }; @@ -346,7 +346,7 @@ private: - std::vector<R> rvec; + MOCKPP_STL::vector<R> rvec; }; } // ns mockpp Index: ExpectationMap.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/ExpectationMap.h,v retrieving revision 1.25 retrieving revision 1.26 diff -u -d -r1.25 -r1.26 --- ExpectationMap.h 13 Nov 2005 11:53:18 -0000 1.25 +++ ExpectationMap.h 26 Nov 2005 18:00:16 -0000 1.26 @@ -32,8 +32,8 @@ #include <mockpp/mockpp.h> // always first -#include <algorithm> -#include <map> +#include MOCKPP_ALGORITHM_H +#include MOCKPP_MAP_H #include <mockpp/ExpectationSet.h> @@ -64,7 +64,7 @@ * @param pair key/value pair * @return reference to itself for chaining */ - ExpectationMap& addExpected(const std::pair<const Key, const Value> &pair) + ExpectationMap& addExpected(const MOCKPP_STL::pair<const Key, const Value> &pair) { ExpectationSet<Key>::addExpected(pair.first); myEntries.insert(pair); @@ -94,7 +94,7 @@ ExpectationMap& addExpected(const Key &key, const Value &value) { ExpectationSet<Key>::addExpected(key); - myEntries.insert(std::make_pair(key, value)); + myEntries.insert(MOCKPP_STL::make_pair(key, value)); return *this; } @@ -134,7 +134,7 @@ private: - std::map<Key, Value> myEntries; + MOCKPP_STL::map<Key, Value> myEntries; }; Index: MockObject.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/MockObject.cpp,v retrieving revision 1.23 retrieving revision 1.24 diff -u -d -r1.23 -r1.24 --- MockObject.cpp 27 Feb 2005 11:48:14 -0000 1.23 +++ MockObject.cpp 26 Nov 2005 18:00:16 -0000 1.24 @@ -30,7 +30,7 @@ #include <mockpp/mockpp.h> // always first -#include <algorithm> +#include MOCKPP_ALGORITHM_H #include <mockpp/MockObject.h> @@ -96,7 +96,7 @@ VerifierVec &alreadyProcessed) { if ( isVerifiable(anObject) - && std::find(alreadyProcessed.begin(), alreadyProcessed.end(), anObject) == alreadyProcessed.end()) + && MOCKPP_STL::find(alreadyProcessed.begin(), alreadyProcessed.end(), anObject) == alreadyProcessed.end()) { alreadyProcessed.push_back(anObject); anObject->verify(); Index: mockpp.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/mockpp.h,v retrieving revision 1.57 retrieving revision 1.58 diff -u -d -r1.57 -r1.58 --- mockpp.h 18 Nov 2005 08:49:34 -0000 1.57 +++ mockpp.h 26 Nov 2005 18:00:17 -0000 1.58 @@ -35,7 +35,7 @@ \section abstract Abstract mockpp is a platform independent generic unit testing framework for C++. It's goal is to facilitate - developing unit tests and integraton tests in the spirit of + developing unit tests and integraton tests in the spirit of <a href="http://www.mockobjects.com/">Mock Objects for Java</a>, <a href="http://www.easymock.org/">EasyMock</a> and <a href="http://www.jmock.org/">jMock</a>. @@ -152,7 +152,29 @@ //# define _GLIBCPP_HAVE_WCHAR_H #endif +#ifdef MOCKPP_MINI_STL + +#include <ministl/string> +#define MOCKPP_VECTOR_H <ministl/vector> +#define MOCKPP_MAP_H <ministl/map> +#define MOCKPP_SET_H <ministl/set> +#define MOCKPP_ALGORITHM_H <ministl/algorithm> +#define MOCKPP_FUNCTION_H <ministl/function> +#define MOCKPP_DEQUE_H <ministl/deque> +#define MOCKPP_STL ministl + +#else + #include <string> +#define MOCKPP_STL std +#define MOCKPP_VECTOR_H <vector> +#define MOCKPP_MAP_H <map> +#define MOCKPP_DEQUE_H <deque> +#define MOCKPP_SET_H <set> +#define MOCKPP_FUNCTION_H <function> +#define MOCKPP_ALGORITHM_H <algorithm> + +#endif #ifdef HAVE_LIMITS # include <limits> // current @@ -169,7 +191,7 @@ */ #ifdef HAVE_LIMITS -# define MOCKPP_UNLIMITED (std::numeric_limits<unsigned>::max()) +# define MOCKPP_UNLIMITED (MOCKPP_STL::numeric_limits<unsigned>::max()) #else # define MOCKPP_UNLIMITED (UINT_MAX) #endif @@ -178,7 +200,7 @@ # define MOCKPP_FUNC_MACRO __FUNC__ #elif defined(_MSC_VER) # if _MSC_VER <= 1200 -# define MOCKPP_FUNC_MACRO (std::string(__FILE__) + "_" + mockpp::getLatin1(mockpp::number((long unsigned)__LINE__))) // needs #include <mockpp/compat/Formatter.h> +# define MOCKPP_FUNC_MACRO (MOCKPP_STL::string(__FILE__) + "_" + mockpp::getLatin1(mockpp::number((long unsigned)__LINE__))) // needs #include <mockpp/compat/Formatter.h> # else # define MOCKPP_FUNC_MACRO __FUNCSIG__ # endif @@ -205,7 +227,7 @@ //! Output char values more readable (e.g. non-alphanumeric as number) #define MOCKPP_MAKE_CHAR_READABLE 1 -//! mockpp::Exception is derived from std::exception +//! mockpp::Exception is derived from MOCKPP_STL::exception #define MOCKPP_USE_STD_EXCEPTION 1 #undef HAVE_MULTITHREAD // obsolete and error prone @@ -295,7 +317,7 @@ #ifdef MOCKPP_UNICODE - typedef std::basic_string<wchar_t> String; + typedef MOCKPP_STL::basic_string<wchar_t> String; typedef wchar_t Char; //! make the charactor constant of type wchar_t # define MOCKPP_CHAR(x) L##x @@ -304,7 +326,7 @@ #else - typedef std::string String; + typedef MOCKPP_STL::string String; typedef char Char; //! make the charactor constant of type char # define MOCKPP_CHAR(x) x @@ -342,7 +364,7 @@ * @param info some human readable information */ void getVersion (int &major, int &minor, int &patch, - bool &debug, std::string &info); + bool &debug, MOCKPP_STL::string &info); #ifdef MOCKPP_UNICODE @@ -352,7 +374,7 @@ * @param latin1 string in ISO8859-1 encoding * @return the string in unicode */ - std::basic_string<wchar_t> getUnicode(const std::string &latin1); + MOCKPP_STL::basic_string<wchar_t> getUnicode(const MOCKPP_STL::string &latin1); /** Converts a string from unicode to unicode. @@ -360,7 +382,7 @@ * @param uni string in unicode * @return the same string */ - inline std::basic_string<wchar_t> getUnicode(const std::basic_string<wchar_t> &uni) + inline MOCKPP_STL::basic_string<wchar_t> getUnicode(const MOCKPP_STL::basic_string<wchar_t> &uni) { return uni; } @@ -371,7 +393,7 @@ * @param uni string in unicode * @return the string in IOS8859-1 encoding */ - std::string getLatin1(const std::basic_string<wchar_t> &uni); + MOCKPP_STL::string getLatin1(const MOCKPP_STL::basic_string<wchar_t> &uni); #endif @@ -380,7 +402,7 @@ * @param latin1 string in ISO8859-1 encoding * @return the same string */ - inline std::string getLatin1(const std::string &latin1) + inline MOCKPP_STL::string getLatin1(const MOCKPP_STL::string &latin1) { return latin1; } Index: VisitableMockMethod.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/VisitableMockMethod.h,v retrieving revision 1.21 retrieving revision 1.22 diff -u -d -r1.21 -r1.22 --- VisitableMockMethod.h 18 Nov 2005 10:20:00 -0000 1.21 +++ VisitableMockMethod.h 26 Nov 2005 18:00:17 -0000 1.22 @@ -61,7 +61,7 @@ /** Gets the method identifier. * @return method identifier */ - std::string getMethodIdentifier() const; + MOCKPP_STL::string getMethodIdentifier() const; /** Gets the parent mock object. * @return pointer to mock object @@ -180,7 +180,7 @@ mutable ThrowableItem defaultThrowable; mutable ThrowableList throwables; mutable bool throwablesInline; - mutable std::vector<bool> throwableInsteadReturn; + mutable MOCKPP_STL::vector<bool> throwableInsteadReturn; }; Index: mockpp.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/mockpp.cpp,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- mockpp.cpp 2 Apr 2005 20:45:29 -0000 1.20 +++ mockpp.cpp 26 Nov 2005 18:00:16 -0000 1.21 @@ -35,15 +35,15 @@ void MOCKPP_EXPORT getVersion (int &major, int &minor, int &patch, - bool &debug, std::string &info) + bool &debug, MOCKPP_STL::string &info) { - std::string s = MOCKPP_VERSION; - std::string num; + MOCKPP_STL::string s = MOCKPP_VERSION; + MOCKPP_STL::string num; info = ""; unsigned pos = s.find('.'); bool good = true; - if (pos != std::string::npos) + if (pos != MOCKPP_STL::string::npos) { num = s.substr(0, pos); if (num.length() == 0) @@ -56,7 +56,7 @@ s.erase(0, pos+1); unsigned pos = s.find('.'); - if (pos != std::string::npos) + if (pos != MOCKPP_STL::string::npos) { num = s.substr(0, pos); if (num.length() == 0) @@ -100,9 +100,9 @@ #ifdef MOCKPP_UNICODE -std::basic_string<wchar_t> MOCKPP_EXPORT getUnicode(const std::string &latin1) +MOCKPP_STL::basic_string<wchar_t> MOCKPP_EXPORT getUnicode(const MOCKPP_STL::string &latin1) { - std::basic_string<wchar_t> ret; + MOCKPP_STL::basic_string<wchar_t> ret; for (unsigned i = 0; i < latin1.length(); ++i) ret += (wchar_t) latin1[i]; @@ -110,9 +110,9 @@ } -std::string MOCKPP_EXPORT getLatin1(const std::basic_string<wchar_t> &uni) +MOCKPP_STL::string MOCKPP_EXPORT getLatin1(const MOCKPP_STL::basic_string<wchar_t> &uni) { - std::string ret; + MOCKPP_STL::string ret; for (unsigned i = 0; i < uni.length(); ++i) ret += (mockpp::Char) uni[i]; Index: TrackingCounter.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/TrackingCounter.h,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- TrackingCounter.h 13 Nov 2005 11:53:18 -0000 1.6 +++ TrackingCounter.h 26 Nov 2005 18:00:17 -0000 1.7 @@ -35,7 +35,7 @@ #include <mockpp/AbstractExpectation.h> -#include <vector> +#include MOCKPP_VECTOR_H namespace mockpp { @@ -176,7 +176,7 @@ TrackingCounterMaster (const TrackingCounterMaster &); // forbid TrackingCounterMaster& operator=(TrackingCounterMaster&); - std::vector<TrackingCounterClient*> clients; + MOCKPP_STL::vector<TrackingCounterClient*> clients; unsigned myActualValue; }; @@ -247,7 +247,7 @@ TrackingCounterClient (const TrackingCounterClient &); // forbid TrackingCounterClient& operator=(TrackingCounterClient&); - std::vector<unsigned> countervalues; + MOCKPP_STL::vector<unsigned> countervalues; TrackingCounterMaster *master; unsigned myActualValue; }; Index: VisitableMockObject_template.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/VisitableMockObject_template.h,v retrieving revision 1.28 retrieving revision 1.29 diff -u -d -r1.28 -r1.29 --- VisitableMockObject_template.h 27 Oct 2005 18:56:07 -0000 1.28 +++ VisitableMockObject_template.h 26 Nov 2005 18:00:17 -0000 1.29 @@ -65,8 +65,8 @@ // tvec.verify(); Not this one because it NEVER runs empty, use counter[] instead unsigned unused = 0; - std::vector<unsigned>::const_iterator start = counter.begin(); - std::vector<unsigned>::const_iterator end = counter.end(); + MOCKPP_STL::vector<unsigned>::const_iterator start = counter.begin(); + MOCKPP_STL::vector<unsigned>::const_iterator end = counter.end(); for ( ; start != end; ++start) if (*start != MOCKPP_UNLIMITED) // @todo ouput signatures of unused objects unused += *start; @@ -90,7 +90,7 @@ protected: ThrowableList tvec; - std::vector<unsigned> counter; + MOCKPP_STL::vector<unsigned> counter; }; Index: VisitableMockObject.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/VisitableMockObject.cpp,v retrieving revision 1.25 retrieving revision 1.26 diff -u -d -r1.25 -r1.26 --- VisitableMockObject.cpp 13 Nov 2005 11:53:18 -0000 1.25 +++ VisitableMockObject.cpp 26 Nov 2005 18:00:17 -0000 1.26 @@ -48,14 +48,14 @@ } -void MOCKPP_EXPORT VisitableMockObjectBase::addExpectedMethod(const std::string &name) const +void MOCKPP_EXPORT VisitableMockObjectBase::addExpectedMethod(const MOCKPP_STL::string &name) const { MOCKPP_ASSERT_EQUALS(isActivated(), false); methodList.addExpected(name); } -void MOCKPP_EXPORT VisitableMockObjectBase::addActualMethod(const std::string &name) const +void MOCKPP_EXPORT VisitableMockObjectBase::addActualMethod(const MOCKPP_STL::string &name) const { MOCKPP_ASSERT_EQUALS(isActivated(), true); methodList.addActual(name); @@ -105,8 +105,8 @@ void MOCKPP_EXPORT VisitableMockObjectBase::removeController (Controller *ctr) { - std::vector<Controller*>::iterator it = - std::find (controllers.begin(), controllers.end(), ctr); + MOCKPP_STL::vector<Controller*>::iterator it = + MOCKPP_STL::find (controllers.begin(), controllers.end(), ctr); if (it != controllers.end()) controllers.erase(it); } Index: VisitableMockObject.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/VisitableMockObject.h,v retrieving revision 1.42 retrieving revision 1.43 diff -u -d -r1.42 -r1.43 --- VisitableMockObject.h 13 Nov 2005 11:53:18 -0000 1.42 +++ VisitableMockObject.h 26 Nov 2005 18:00:17 -0000 1.43 @@ -32,7 +32,7 @@ #include <mockpp/mockpp.h> // always first -#include <vector> +#include MOCKPP_VECTOR_H #include <mockpp/MockObject.h> #include <mockpp/Throwable.h> @@ -82,12 +82,12 @@ /** Adds another expected call to a mock method. * @param name unique identifier for method */ - void addExpectedMethod(const std::string &name) const; + void addExpectedMethod(const MOCKPP_STL::string &name) const; /** Adds another actual call to a mock method. * @param name unique identifier for method */ - void addActualMethod(const std::string &name) const; + void addActualMethod(const MOCKPP_STL::string &name) const; /** Get information about working mode. * @return false: object is in record mode @@ -126,9 +126,9 @@ VisitableMockObjectBase (const VisitableMockObjectBase &); // forbid VisitableMockObjectBase& operator=(VisitableMockObjectBase&); - mutable ExpectationList<std::string> methodList; + mutable ExpectationList<MOCKPP_STL::string> methodList; mutable bool activated; - std::vector<Controller*> controllers; + MOCKPP_STL::vector<Controller*> controllers; }; Index: ResponseVector1.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/ResponseVector1.h,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- ResponseVector1.h 13 Nov 2005 11:53:18 -0000 1.7 +++ ResponseVector1.h 26 Nov 2005 18:00:17 -0000 1.8 @@ -126,7 +126,7 @@ protected: - std::vector<Constraint<P1>*> t1vec; + MOCKPP_STL::vector<Constraint<P1>*> t1vec; }; @@ -241,7 +241,7 @@ private: - std::vector<R> rvec; + MOCKPP_STL::vector<R> rvec; }; } // ns mockpp Index: ReturnObjectList.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/ReturnObjectList.h,v retrieving revision 1.30 retrieving revision 1.31 diff -u -d -r1.30 -r1.31 --- ReturnObjectList.h 13 Nov 2005 11:53:18 -0000 1.30 +++ ReturnObjectList.h 26 Nov 2005 18:00:17 -0000 1.31 @@ -32,7 +32,7 @@ #include <mockpp/mockpp.h> // always first -#include <deque> +#include MOCKPP_DEQUE_H #include <mockpp/Verifiable.h> Index: ExpectationConglomeration.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/ExpectationConglomeration.h,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- ExpectationConglomeration.h 13 Nov 2005 11:53:18 -0000 1.19 +++ ExpectationConglomeration.h 26 Nov 2005 18:00:16 -0000 1.20 @@ -32,9 +32,9 @@ #include <mockpp/mockpp.h> // always first -#include <algorithm> -#include <set> -#include <vector> +#include MOCKPP_ALGORITHM_H +#include MOCKPP_SET_H +#include MOCKPP_VECTOR_H #include <mockpp/AbstractExpectationCollection.h> #include <mockpp/util/AssertMo.h> @@ -178,7 +178,7 @@ fmt = mockpp_i18n(MOCKPP_PCHAR("%1 did not receive the expected item set.")); fmt << this->getVerifiableName(); - typename std::set<T>::const_iterator it; + typename MOCKPP_STL::set<T>::const_iterator it; for (it = actualItems.begin(); it != actualItems.end(); ++it) MOCKPP_ASSERT_TRUE_MESSAGE(fmt, contains(*it)); } @@ -207,10 +207,10 @@ */ bool contains(const T &val) const { - if (std::find(expectedSingleItems.begin(), expectedSingleItems.end(), val) != expectedSingleItems.end()) + if (MOCKPP_STL::find(expectedSingleItems.begin(), expectedSingleItems.end(), val) != expectedSingleItems.end()) return true; - typename std::vector<Boundary>::const_iterator it; + typename MOCKPP_STL::vector<Boundary>::const_iterator it; for (it = expectedBoundaryItems.begin(); it != expectedBoundaryItems.end(); ++it) if ( (*it).contains(val)) return true; @@ -272,9 +272,9 @@ T upper; }; - std::set<T> actualItems; - std::vector<T> expectedSingleItems; - std::vector<Boundary> expectedBoundaryItems; + MOCKPP_STL::set<T> actualItems; + MOCKPP_STL::vector<T> expectedSingleItems; + MOCKPP_STL::vector<Boundary> expectedBoundaryItems; bool expectNothing; bool haveActualValue; }; Index: VerifiableList.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/mockpp/VerifiableList.h,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- VerifiableList.h 6 Apr 2005 20:15:19 -0000 1.17 +++ VerifiableList.h 26 Nov 2005 18:00:17 -0000 1.18 @@ -35,7 +35,7 @@ #include <mockpp/Verifiable.h> -#include <vector> +#include MOCKPP_VECTOR_H namespace mockpp { @@ -99,7 +99,7 @@ VerifiableList (const VerifiableList &); // forbid VerifiableList& operator=(VerifiableList&); - std::vector<Verifiable*> verifiables; + MOCKPP_STL::vector<Verifiable*> verifiables; }; |