Anonymous - 2002-09-10

The following code causes a segfault when I include more than one CPPUNIT_TEST in CPPUNIT_TEST_SUITE (if I comment out either one it works). I'm not sure if I'm doing something wrong (first time I've used cppunit) or if it is a bug.

I'm using cppunit 1.8.0 on Red Hat 7.3.

Thanks,
Iztok

/#include <string.h>
#include <memory>

#include <cppunit/extensions/HelperMacros.h>
#include <cppunit/TestCase.h>
#include <cppunit/TestFixture.h>
class CGModbusDriverLoopbackTest : public CppUnit::TestFixture
{
public:

CPPUNIT_TEST_SUITE( CGModbusDriverLoopbackTest );
CPPUNIT_TEST( testNormalOperation );
CPPUNIT_TEST( testReplyTooBig );
CPPUNIT_TEST_SUITE_END();

public:

void setUp(void)
{
}

void tearDown(void)
{
}

void testNormalOperation(void)
{
cout << "\n--------------- testNormalOperation -------------" << endl;
}

void testReplyTooBig(void)
{
cout << "\n--------------- testReplyTooBig -------------" << endl;

}

};

/* register the test module with the test registry */
CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(CGModbusDriverLoopbackTest, "ModbusDriverLoopbackTest");