本文整理汇总了C++中MockSupport类的典型用法代码示例。如果您正苦于以下问题:C++ MockSupport类的具体用法?C++ MockSupport怎么用?C++ MockSupport使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了MockSupport类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getMockSupport
void MockSupport::clear()
{
delete lastActualFunctionCall_;
lastActualFunctionCall_ = NULL;
tracing_ = false;
MockFunctionCallTrace::instance().clear();
expectations_.deleteAllExpectationsAndClearList();
compositeCalls_.clear();
ignoreOtherCalls_ = false;
enabled_ = true;
callOrder_ = 0;
expectedCallOrder_ = 0;
strictOrdering_ = false;
for (MockNamedValueListNode* p = data_.begin(); p; p = p->next()) {
MockSupport* support = getMockSupport(p);
if (support) {
support->clear();
delete support;
}
}
data_.clear();
}
示例2: mock
MockSupport& mock(const SimpleString& mockName, MockFailureReporter* failureReporterForThisCall)
{
MockSupport& mock_support = (mockName != "") ? *global_mock.getMockSupportScope(mockName) : global_mock;
mock_support.setActiveReporter(failureReporterForThisCall);
mock_support.setDefaultComparatorsAndCopiersRepository();
return mock_support;
}
示例3: MockSupport
MockSupport* MockSupport::clone(const SimpleString& mockName)
{
MockSupport* newMock = new MockSupport(mockName);
newMock->setMockFailureStandardReporter(standardReporter_);
if (ignoreOtherCalls_) newMock->ignoreOtherCalls();
if (!enabled_) newMock->disable();
if (strictOrdering_) newMock->strictOrder();
newMock->tracing(tracing_);
newMock->installComparatorsAndCopiers(comparatorsAndCopiersRepository_);
return newMock;
}
示例4: STRCMP_EQUAL
MockSupport* MockSupport::getMockSupportScope(const SimpleString& name)
{
SimpleString mockingSupportName = MOCK_SUPPORT_SCOPE_PREFIX;
mockingSupportName += name;
if (hasData(mockingSupportName)) {
STRCMP_EQUAL("MockSupport", getData(mockingSupportName).getType().asCharString());
return (MockSupport*) getData(mockingSupportName).getObjectPointer();
}
MockSupport *newMock = new MockSupport;
newMock->setMockFailureReporter(reporter_);
if (ignoreOtherCalls_) newMock->ignoreOtherCalls();
if (!enabled_) newMock->disable();
newMock->tracing(tracing_);
newMock->installComparators(comparatorRepository_);
setDataObject(mockingSupportName, "MockSupport", newMock);
return newMock;
}
示例5: mock
MockSupport& mock(const SimpleString& mockName)
{
if (mockName != "")
return *global_mock.getMockSupportScope(mockName);
return global_mock;
}
示例6: mock
MockSupport& mock(const SimpleString& mockName, MockFailureReporter* failureReporterForThisCall)
{
MockSupport& mock_support = (mockName != "") ? *global_mock.getMockSupportScope(mockName) : global_mock;
mock_support.setActiveReporter(failureReporterForThisCall);
return mock_support;
}