I have some trouble using CppUnit under Window$ (which works fine under Linux for the same code).
I use a TestFixture like that:
----------------- begin H ----------------------
class MyTest : public CPPUNIT_NS::TestFixture {
CPPUNIT_TEST_SUITE(MyTest) ;
CPPUNIT_TEST(test1) ;
CPPUNIT_TEST_SUITE_END();
protected:
void test1() ;
} ;
------------------ end H -----------------------
---------------- begin CPP ---------------------
#include "my_test.h"
CPPUNIT_TEST_SUITE_REGISTRATION(MyTest) ;
void MyTest::test1() {
}
------------------ end CPP ---------------------
This create the dll with the exported function entry:
"cppunitTestPlugin"
However, when I load this in the follwing testrunner, the runner load the dll correctly, when no test function are found :-(
What is wrong?
Note: In the Makefile, the preprocessor CPPUNIT_DLL is defined, and the dll is linked against cppunit_dll.lib, whereas the runner is linked against cppunit.lib
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Oooops I misspell a word:
"However, when I load this in the follwing testrunner, the runner load the dll correctly, BUT no test function are found...the test1() is not launched"
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have some trouble using CppUnit under Window$ (which works fine under Linux for the same code).
I use a TestFixture like that:
----------------- begin H ----------------------
class MyTest : public CPPUNIT_NS::TestFixture {
CPPUNIT_TEST_SUITE(MyTest) ;
CPPUNIT_TEST(test1) ;
CPPUNIT_TEST_SUITE_END();
protected:
void test1() ;
} ;
------------------ end H -----------------------
---------------- begin CPP ---------------------
#include "my_test.h"
CPPUNIT_TEST_SUITE_REGISTRATION(MyTest) ;
void MyTest::test1() {
}
------------------ end CPP ---------------------
This create the dll with the exported function entry:
"cppunitTestPlugin"
However, when I load this in the follwing testrunner, the runner load the dll correctly, when no test function are found :-(
------------ begin RUNNER -----------------------
...
CppUnit::TextUi::TestRunner runner ;
...
CppUnit::TestFactoryRegistry ®istry =
CppUnit::TestFactoryRegistry::getRegistry() ;
runner.addTest( registry.makeTest() ) ;
runner.run( "", false ) ;
-------------- end RUNNER -----------------------
What is wrong?
Note: In the Makefile, the preprocessor CPPUNIT_DLL is defined, and the dll is linked against cppunit_dll.lib, whereas the runner is linked against cppunit.lib
Oooops I misspell a word:
"However, when I load this in the follwing testrunner, the runner load the dll correctly, BUT no test function are found...the test1() is not launched"