When building a plugin test.dll; DllPlugInTester.exe does not run any test. I can only get this to work by using DllPlugInTester_dll.exe
How do I build a test.dll which utilizes DllPlugInTester.exe?
I have tried many permutations of building the test.dll. E.g.
Additional Include Directories: $(CPPUNIT_DIR)/include
Preprocessor Definitions: CPPUNIT_DLL
Enable Run-Time Type Info: yes
Runtime Library: Multi-threaded Debug DLL (/MDd)
Additional Library Directories: $(CPPUNIT_DIR)/lib
Additional Dependencies: cppunit_dll.lib
Using: CppUnit 1.12.0, VC++ 7.1
> DllPlugInTester.exe –t test.dll
OK (0 tests)
> DllPlugInTester_dll.exe –t test.dll
..F.
!!!FAILURES!!!
Test Results:
Run: 3 Failures: 1 Errors: 0
class test : public CppUnit::TestFixture
{
CPPUNIT_TEST_SUITE( test );
CPPUNIT_TEST( test1 );
CPPUNIT_TEST( test2 );
CPPUNIT_TEST( test3 );
CPPUNIT_TEST_SUITE_END();
public:
void setUp();
void tearDown();
void test1();
void test2();
void test3();
};
#endif
//test.cxx
#include "test.h"
CPPUNIT_TEST_SUITE_REGISTRATION( test );
void test::setUp(){}
void test::tearDown(){}
void test::test1(){CPPUNIT_ASSERT( 1 == 1 );}
void test::test2(){CPPUNIT_ASSERT( 1 == 2 );}
void test::test3(){CPPUNIT_ASSERT( 1 != 2 );}
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
When building a plugin test.dll; DllPlugInTester.exe does not run any test. I can only get this to work by using DllPlugInTester_dll.exe
How do I build a test.dll which utilizes DllPlugInTester.exe?
I have tried many permutations of building the test.dll. E.g.
Additional Include Directories: $(CPPUNIT_DIR)/include
Preprocessor Definitions: CPPUNIT_DLL
Enable Run-Time Type Info: yes
Runtime Library: Multi-threaded Debug DLL (/MDd)
Additional Library Directories: $(CPPUNIT_DIR)/lib
Additional Dependencies: cppunit_dll.lib
Using: CppUnit 1.12.0, VC++ 7.1
> DllPlugInTester.exe –t test.dll
OK (0 tests)
> DllPlugInTester_dll.exe –t test.dll
..F.
!!!FAILURES!!!
Test Results:
Run: 3 Failures: 1 Errors: 0
//main.cxx
#include <cppunit/plugin/TestPlugIn.h>
CPPUNIT_PLUGIN_IMPLEMENT();
//test.h
#ifndef test_H_
#define test_H_
#include <cppunit/TestFixture.h>
#include <cppunit/extensions/HelperMacros.h>
class test : public CppUnit::TestFixture
{
CPPUNIT_TEST_SUITE( test );
CPPUNIT_TEST( test1 );
CPPUNIT_TEST( test2 );
CPPUNIT_TEST( test3 );
CPPUNIT_TEST_SUITE_END();
public:
void setUp();
void tearDown();
void test1();
void test2();
void test3();
};
#endif
//test.cxx
#include "test.h"
CPPUNIT_TEST_SUITE_REGISTRATION( test );
void test::setUp(){}
void test::tearDown(){}
void test::test1(){CPPUNIT_ASSERT( 1 == 1 );}
void test::test2(){CPPUNIT_ASSERT( 1 == 2 );}
void test::test3(){CPPUNIT_ASSERT( 1 != 2 );}