コード例 #1
0
//////////////////////////////////////////////////////////////
// Private
Invokable*
HookMockObject::getInvokable(const void* api) 
{
   ChainableMockMethodCore* method = This->getMethod(api);
   MOCKCPP_ASSERT_TRUE_MESSAGE(
	   "mockcpp internal error",
	   method != 0);
   return method;
}
コード例 #2
0
ファイル: InvokedAtMost.cpp プロジェクト: Rogerarm/mockcpp
void InvokedAtMost::increaseInvoked(const Invocation& inv)
{
    oss_t oss;

    oss << "Expected at most " << highLimit 
        << " times, but you are trying to invoke more than that.";

    MOCKCPP_ASSERT_TRUE_MESSAGE(
         oss.str(), getInvokedTimes() < highLimit);
}
コード例 #3
0
ファイル: InvokedAtMost.cpp プロジェクト: Rogerarm/mockcpp
void InvokedAtMost::verify(void)
{
// We won't need to verify it here, it was checked at runtime.
#if 0
    oss_t oss;
    
    oss << "Expected at most " << highLimit 
        << " times, but it's actually invoked " << getInvokedTimes() << " times";

    MOCKCPP_ASSERT_TRUE_MESSAGE(
			oss.str(),
         getInvokedTimes() <= highLimit);
#endif
}