blob: 73b0d141f4fa04c29f1dfa23ff8d2ef9a36093c3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
// //////////////////////////////////////////////////////////////////////////
// Header file TestPlugIn.h for class TestPlugIn
// (c)Copyright 2000, Baptiste Lepilleur.
// Created: 2001/06/23
// //////////////////////////////////////////////////////////////////////////
#ifndef TESTPLUGIN_H
#define TESTPLUGIN_H
#include <string>
#include <cppunit/test.h>
#include <cppunit/plugin/PlugInManager.h>
/*! \class TestPlugIn
* \brief This class represents a test plug-in.
*/
class TestPlugIn
{
public:
/*! Constructs a TestPlugIn object.
*/
TestPlugIn( const std::string fileName );
/*! Destructor.
*/
virtual ~TestPlugIn();
/*! Obtains a new test from a new copy of the dll.
* \exception TestPlugInException if a error occurs.
*/
CPPUNIT_NS::Test *makeTest();
private:
/// Prevents the use of the copy constructor.
TestPlugIn( const TestPlugIn © );
/// Prevents the use of the copy operator.
void operator =( const TestPlugIn © );
void reloadDll();
void deleteDllCopy();
/*! Copy m_fileName DLL to m_copyFileName.
*
* Working on a copy of the DLL allow to update the original DLL.
* \exception TestPlugInException on copy failure.
*/
void makeDllCopy();
/*! Load the DLL.
* \exception TestPlugInException on dll loading failure.
*/
void loadDll();
private:
std::string m_fileName;
std::string m_copyFileName;
CPPUNIT_NS::PlugInManager m_manager;
};
// Inlines methods for TestPlugIn:
// -------------------------------
#endif // TESTPLUGIN_H
|