For CppUnit 1.12.0 when using the MFC TestRunner, double clicking on an error will not take the user to the failing code.
Fix: Add the following lines to the goToLineInSourceCode() function within MsDevCallerListCtrl.cpp
//BEGIN NEW CODE #ifndef _UNICODE char fullPath[ _MAX_PATH ] = ""; if( _fullpath( fullPath, fileName, _MAX_PATH ) != NULL ) { fileName = fullPath; } #else wchar_t fullPath[ _MAX_PATH ] = L""; if( _wfullpath( fullPath, fileName, _MAX_PATH ) != NULL ) { fileName = fullPath; } #endif //END NEW CODE
CComPtr< EnvDTE::Document > pIDocument; CComBSTR bstrFileName( fileName );
Root cause: This seems to be due to the fact that pIDocuments->Open() will fail if it's not passed the full path name.
Log in to post a comment.
For CppUnit 1.12.0 when using the MFC TestRunner, double clicking on an error will not take the user to the failing code.
Fix:
Add the following lines to the goToLineInSourceCode() function within MsDevCallerListCtrl.cpp
//BEGIN NEW CODE
#ifndef _UNICODE
char fullPath[ _MAX_PATH ] = "";
if( _fullpath( fullPath, fileName, _MAX_PATH ) != NULL )
{
fileName = fullPath;
}
#else
wchar_t fullPath[ _MAX_PATH ] = L"";
if( _wfullpath( fullPath, fileName, _MAX_PATH ) != NULL )
{
fileName = fullPath;
}
#endif
//END NEW CODE
CComPtr< EnvDTE::Document > pIDocument;
CComBSTR bstrFileName( fileName );
Root cause:
This seems to be due to the fact that pIDocuments->Open() will fail if it's not passed the full path name.