Hi, I'm newbie to CppUnit and I'm running into some trouble using CppUnit with a .DLL (I'm using MSVC 6).
I've created just a basic dll project in VC and added a simple test class, basically in the same vein as the instructions here: https://www.embracetherandom.com/MFCTestRunner/index.htm
I'm linking against cppunit_dll.lib and testrunner.lib.
When I run TestPlugInRunner.exe and select my dll from "Choose DLL" an error dialog pops up reporting "Symbol [cppunitTestPlugIn] not found in dynamic library..."
Here's the code from my test class:
// TestClass.h: interface for the CTestClass class.
#if _MSC_VER > 1000
#endif // _MSC_VER > 1000
class CTestClass : public CppUnit::TestFixture
CPPUNIT_TEST_SUITE( CTestClass );
CPPUNIT_TEST( Test1 );
#endif // !defined(AFX_TESTCLASS_H__66A29ADF_B786_4AAF_B567_DBE76FE271E8__INCLUDED_)
// TestClass.cpp: implementation of the CTestClass class.
static char THIS_FILE=__FILE__;
#define new DEBUG_NEW
CPPUNIT_ASSERT_ASSERTION_FAIL("Test Not Implemented");
I'd really appreciate any feedback anyone could give me, I've been looking at this for awhile now and I know I must just be missing something simple.
I guess I should add that I am wanting to test in a .DLL that already has a DllMain. According to this post http://sourceforge.net/forum/forum.php?thread_id=1075752&forum_id=37108, and some others, I shouldn't have to use the CPPUNIT_PLUGIN_IMPLEMENT macro, but I'm not sure what I'm missing that is keeping it from working.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.