summaryrefslogtreecommitdiff
path: root/src/qttestrunner/TestRunnerThread.h
blob: 54cb4f17e2d5774172698c4733b6449fc473e6aa (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
// //////////////////////////////////////////////////////////////////////////
// Header file TestRunnerThread.h for class TestRunnerThread
// (c)Copyright 2000, Baptiste Lepilleur.
// Created: 2001/09/22
// //////////////////////////////////////////////////////////////////////////
#ifndef TESTRUNNERTHREAD_H
#define TESTRUNNERTHREAD_H

#include <qthread.h>
#include <cppunit/Test.h>
#include <cppunit/TestResult.h>
class QObject;
class TestRunnerThreadFinishedEvent;


/*! \class TestRunnerThread
 * \brief This class represents the thread used to run TestCase.
 */
class TestRunnerThread : public QThread
{
public:
  /*! Constructs a TestRunnerThread object.
   */
  TestRunnerThread( CPPUNIT_NS::Test *testToRun,
                    CPPUNIT_NS::TestResult *result,
                    QObject *eventTarget,
                    TestRunnerThreadFinishedEvent *finishedEvent );

  /// Destructor.
  virtual ~TestRunnerThread();

private:
  /// Prevents the use of the copy constructor.
  TestRunnerThread( const TestRunnerThread &copy );

  /// Prevents the use of the copy operator.
  void operator =( const TestRunnerThread &copy );

  void run();

private:
 CPPUNIT_NS::Test *_testToRun;
 CPPUNIT_NS::TestResult *_result;
 QObject *_eventTarget;
 TestRunnerThreadFinishedEvent *_finishedEvent;
};



// Inlines methods for TestRunnerThread:
// -------------------------------------



#endif  // TESTRUNNERTHREAD_H