RoadTest.h
Go to the documentation of this file.
1 /****************************************************************************
2 **
3 ** Copyright (c) 2008-2015 C.B. Barber. All rights reserved.
4 ** $Id: //main/2015/qhull/src/qhulltest/RoadTest.h#2 $$Change: 2062 $
5 ** $Date: 2016/01/17 $$Author: bbarber $
6 **
7 ****************************************************************************/
8 
9 #ifndef ROADTEST_H
10 #define ROADTEST_H
11 
12 //pre-compiled with RoadTest.h
13 #include <QObject> // Qt C++ Framework
14 #include <QtTest/QtTest>
15 
16 #define QHULL_USES_QT 1
17 
18 namespace orgQhull {
19 
20 #
21 
22  class RoadTest;
25 
54 class RoadTest : public QObject
55 {
56  Q_OBJECT
57 
58 #
59 protected:
60  static QList<RoadTest *>
62  static int s_test_count;
63  static int s_test_fail;
64  static QStringList s_failed_tests;
65 
66 #
67 public slots:
68  void cleanup();
69 
70 public:
71 #
72  RoadTest() { s_testcases.append(this); }
73  virtual ~RoadTest() {} // Derived from QObject
74 
75 #
76  void recordFailedTest();
77 
78 
79 #
80  static void deleteTests();
81  static int runTests(QStringList arguments);
82 
83 };//RoadTest
84 
85 #define TESTadd_(t) extern void t(); t();
86 
87 
88 }//orgQhull
89 
90 namespace QTest{
91 
92 template<>
93 inline char *
94 toString(const std::string &s)
95 {
96  return qstrdup(s.c_str());
97 }
98 
99 }//namespace QTest
100 
101 #endif //ROADTEST_H
102 
orgQhull::RoadTest::s_test_count
static int s_test_count
! List of testcases to execute. Initialized via add_...()
Definition: RoadTest.h:62
orgQhull
QhullRidge – Qhull's ridge structure, ridgeT, as a C++ class.
Definition: Coordinates.cpp:21
orgQhull::RoadTest::s_failed_tests
static QStringList s_failed_tests
! Number of failed tests
Definition: RoadTest.h:64
orgQhull::RoadTest::s_testcases
static QList< RoadTest * > s_testcases
Definition: RoadTest.h:61
QTest::toString
char * toString(const std::string &s)
Definition: RoadTest.h:94
orgQhull::RoadTest::~RoadTest
virtual ~RoadTest()
Definition: RoadTest.h:73
orgQhull::RoadTest
Definition: RoadTest.h:54
orgQhull::RoadTest::runTests
static int runTests(QStringList arguments)
Definition: RoadTest.cpp:68
orgQhull::RoadTest::s_test_fail
static int s_test_fail
! Total number of tests executed
Definition: RoadTest.h:63
orgQhull::RoadTest::cleanup
void cleanup()
Executed after each test.
Definition: RoadTest.cpp:38
QTest
Definition: RoadTest.h:90


hpp-fcl
Author(s):
autogenerated on Sat Nov 23 2024 03:44:59