コード例 #1
0
ファイル: MockSupport.cpp プロジェクト: Mindtribe/cpputest
void MockSupport::failTestWithOutOfOrderCalls()
{
    MockExpectedCallsList expectationsList;
    expectationsList.addExpectations(expectations_);

    for(MockNamedValueListNode *p = data_.begin();p;p = p->next())
        if(getMockSupport(p))
            expectationsList.addExpectations(getMockSupport(p)->expectations_);

    MockCallOrderFailure failure(activeReporter_->getTestToFail(), expectationsList);
    clear();
    failTest(failure);
}
コード例 #2
0
ファイル: MockFailure.cpp プロジェクト: Andne/cpputest
MockCallOrderFailure::MockCallOrderFailure(UtestShell* test, const MockExpectedCallsList& expectations) : MockFailure(test)
{
    MockExpectedCallsList expectationsForOutOfOrder;
    expectationsForOutOfOrder.addExpectations(expectations);
    expectationsForOutOfOrder.onlyKeepOutOfOrderExpectations();

    message_ = "Mock Failure: Out of order calls";
    message_ += "\n";
    addExpectationsAndCallHistory(expectationsForOutOfOrder);
}