当前位置: 首页>>代码示例>>C++>>正文


C++ MockSupport类代码示例

本文整理汇总了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();
}
开发者ID:HackLinux,项目名称:KernelModuleTDDExperiment,代码行数:25,代码来源:MockSupport.cpp

示例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;
}
开发者ID:Mindtribe,项目名称:cpputest,代码行数:7,代码来源:MockSupport.cpp

示例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;
}
开发者ID:Mindtribe,项目名称:cpputest,代码行数:14,代码来源:MockSupport.cpp

示例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;
}
开发者ID:HackLinux,项目名称:KernelModuleTDDExperiment,代码行数:21,代码来源:MockSupport.cpp

示例5: mock

MockSupport& mock(const SimpleString& mockName)
{
	if (mockName != "")
		return *global_mock.getMockSupportScope(mockName);
	return global_mock;
}
开发者ID:HackLinux,项目名称:KernelModuleTDDExperiment,代码行数:6,代码来源:MockSupport.cpp

示例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;
}
开发者ID:hajmf,项目名称:cpputest,代码行数:6,代码来源:MockSupport.cpp


注:本文中的MockSupport类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。