I have successfully been able to use cppunit with Visual Studio .NET, but not the MFC testrunner. I have seen this error mentioned before either in this forum or on the lists and the solution suggested was to use cppunit as a post-build step. However our test suite is large and it is quite painful to sit through every test each time I build, and this does not allow debugging of the tests using breakpoints.
I have RTTI enabled.
The TestRunner window appears and then when I choose Browse I get a dialog with
I do not think that you will get it up and working
with VS .NET. The GUI relies on some
VC 6.0 specific interfaces. Those are (as
far as I know) not present in VC .NET.
VS .NET has a new type of plugin.
If this isn't look at already I'm going to
fix this myself. I'm in dire need of CppUnit.
It could take some time though since I have
to learn the new plugin interface.
/Peter
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The MFC testrunner of 1.9.10 does not rely on any VC 6 features (add-ins). The add-ins is optional and the creation of the COM object will simply failed if not installed without further issues.
The test runner only rely on MFC.
What version are you using ? Where the failure does occurs (what is being freed ?)
Concerning the large test suite, you should consider splitting them and using test plug-in. Also, notes that MFC test runner is slower at running test (the threading suck, GUI update are being done in the same thread as the test run).
Baptiste.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
exact error msg:
h:\CppUnit\cppunit-1.9.10\cppunit-1.9.10\src\msvc6\testrunner\DynamicWindow\cdxCDynamicWndEx.cpp(66): error C2664: 'cdxCDynamicWndEx::RestoreWindowPosition' : cannot convert parameter 2 from 'cdxCDynamicWndEx::RestoreFlags' to 'const CString &'
DSPlugIn error PRJ0019: A tool returned an error code: "duplicating DLL to lib directory"
h:\CppUnit\cppunit-1.9.10\cppunit-1.9.10\src\msvc6\DSPlugIn\StdAfx.h(21): fatal error C1083: Cannot open include file: 'ObjModel\addauto.h': No such file or directory
any clues?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
To eliminate the first error, stick a second parameter of "" (two quotes) onto the line where it complains:
if(!RestoreWindowPosition(_makeFullProfile(M_lpszAutoPosProfileSection,m_strAutoPos), "", rflg_all))
I do not see the include problem you mention.
After that, I get a LOT of link errors that look like this:
CppUnitTestPlugIn error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall CppUnit::ExceptionTestCaseDecorator<class CppUnit::Exception>::~ExceptionTestCaseDecorator<class CppUnit::Exception>(void)" (__imp_??1?$ExceptionTestCaseDecorator@VException@CppUnit@@@CppUnit@@UAE@XZ)
I'm investigating, but if anyone has an idea on how to fix it in the meantime, please let me know.
Hope this helps!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have successfully been able to use cppunit with Visual Studio .NET, but not the MFC testrunner. I have seen this error mentioned before either in this forum or on the lists and the solution suggested was to use cppunit as a post-build step. However our test suite is large and it is quite painful to sit through every test each time I build, and this does not allow debugging of the tests using breakpoints.
I have RTTI enabled.
The TestRunner window appears and then when I choose Browse I get a dialog with
Debug Assertion Failed!
File: dbgdel.cpp
Line: 51
Expression: _BLOCK_TYPE_IS_VALID(pHead->nBlockUse)
Thanks for any help!
Laurie Spencer
I do not think that you will get it up and working
with VS .NET. The GUI relies on some
VC 6.0 specific interfaces. Those are (as
far as I know) not present in VC .NET.
VS .NET has a new type of plugin.
If this isn't look at already I'm going to
fix this myself. I'm in dire need of CppUnit.
It could take some time though since I have
to learn the new plugin interface.
/Peter
The MFC testrunner of 1.9.10 does not rely on any VC 6 features (add-ins). The add-ins is optional and the creation of the COM object will simply failed if not installed without further issues.
The test runner only rely on MFC.
What version are you using ? Where the failure does occurs (what is being freed ?)
Concerning the large test suite, you should consider splitting them and using test plug-in. Also, notes that MFC test runner is slower at running test (the threading suck, GUI update are being done in the same thread as the test run).
Baptiste.
Testrunner in 1.9.10 can not be compiled in VS.net althought it compiled ok in VC6.
The testrunerxx.lib/dll complied from VC6 can not be run under VS.net
exact error msg:
h:\CppUnit\cppunit-1.9.10\cppunit-1.9.10\src\msvc6\testrunner\DynamicWindow\cdxCDynamicWndEx.cpp(66): error C2664: 'cdxCDynamicWndEx::RestoreWindowPosition' : cannot convert parameter 2 from 'cdxCDynamicWndEx::RestoreFlags' to 'const CString &'
DSPlugIn error PRJ0019: A tool returned an error code: "duplicating DLL to lib directory"
h:\CppUnit\cppunit-1.9.10\cppunit-1.9.10\src\msvc6\DSPlugIn\StdAfx.h(21): fatal error C1083: Cannot open include file: 'ObjModel\addauto.h': No such file or directory
any clues?
To eliminate the first error, stick a second parameter of "" (two quotes) onto the line where it complains:
if(!RestoreWindowPosition(_makeFullProfile(M_lpszAutoPosProfileSection,m_strAutoPos), "", rflg_all))
I do not see the include problem you mention.
After that, I get a LOT of link errors that look like this:
CppUnitTestPlugIn error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall CppUnit::ExceptionTestCaseDecorator<class CppUnit::Exception>::~ExceptionTestCaseDecorator<class CppUnit::Exception>(void)" (__imp_??1?$ExceptionTestCaseDecorator@VException@CppUnit@@@CppUnit@@UAE@XZ)
I'm investigating, but if anyone has an idea on how to fix it in the meantime, please let me know.
Hope this helps!