Ignore:
Timestamp:
07/05/11 13:04:29 (13 years ago)
Author:
sherbold
Message:

+ added test verdict pass/fail, including error message and the number of the message in the session at which the verdict was set
+ added result file; location is a parameter when calling the application
+ added test arbiter: if the target of a message cannot be determined correctly, the session fails

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MFCtooling/replay/WindowFinder.cpp

    r32 r105  
    2727        evalPopup = false; 
    2828        parentHandles = NULL; 
     29        success = true; 
    2930} 
    3031 
     
    6566                if( maxScore==0 ) { 
    6667                        std::wcerr << L"Warning: Score is zero." << std::endl; 
     68                        errorMessage = L"score zero"; 
     69                        success = false; 
    6770                } 
    6871                result = find(winData->child); 
     
    7073                if( parentHandles->size()==0 ) { 
    7174                        std::wcerr << L"Error: handle not found." << std::endl; 
     75                        errorMessage = L"handle not found"; 
    7276                        result = NULL; 
     77                        success = false; 
    7378                } 
    7479                else { 
    7580                        if( parentHandles->size()!=1 ) { 
    7681                                std::wcerr << L"Warning: more than one fitting window found." << std::endl; 
     82                                errorMessage = L"multiple matches"; 
     83                                success = false; 
    7784                        } 
    7885                        if( maxScore==0 ) { 
    7986                                std::wcerr << L"Warning: Score is zero." << std::endl; 
     87                                errorMessage = L"score zero"; 
     88                                success = false; 
    8089                        } 
    8190                        result = (*parentHandles)[0]; 
     
    125134        return evalPopup; 
    126135} 
     136 
     137bool WindowFinder::successfull() { 
     138        return success; 
     139} 
     140 
     141std::wstring WindowFinder::getErrorMessage() { 
     142        return errorMessage; 
     143} 
Note: See TracChangeset for help on using the changeset viewer.