qhulltest.cpp
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/qhulltest.cpp#4 $$Change: 2064 $
5 ** $DateTime: 2016/01/18 12:36:08 $$Author: bbarber $
6 **
7 ****************************************************************************/
8 
9 //pre-compiled headers
10 extern "C" {
11  #include "libqhull_r/user_r.h"
12 }
13 #include <iostream>
14 #include "RoadTest.h" // QT_VERSION
15 
16 #include "libqhullcpp/RoadError.h"
17 extern "C" {
18  #include "libqhull_r/qhull_ra.h"
19 }
20 
21 #include <sstream>
22 #include <stdexcept>
23 #include <string>
24 
25 using std::cout;
26 using std::endl;
27 
28 namespace orgQhull {
29 
30 void addQhullTests(QStringList &args)
31 {
33 
34  if(args.contains("--all")){
35  args.removeAll("--all");
36  // up-to-date
52  // qhullStat
54  }//--all
55 }//addQhullTests
56 
57 int main(int argc, char *argv[])
58 {
59 
60  QCoreApplication app(argc, argv);
61  QStringList args= app.arguments();
62  bool isAll= args.contains("--all");
63 
64  QHULL_LIB_CHECK /* Check for compatible library */
65 
67  int status=1010;
68  try{
69  status= RoadTest::runTests(args);
70  }catch(const std::exception &e){
71  cout << "FAIL! : runTests() did not catch error\n";
72  cout << e.what() << endl;
74  cout << RoadError::stringGlobalLog() << endl;
76  }
77  }
79  cout << RoadError::stringGlobalLog() << endl;
81  }
82  if(isAll){
83  cout << "Finished test of libqhullcpp. Test libqhull_r with eg/q_test after building libqhull_r/Makefile" << endl;
84  }else{
85  cout << "Finished test of one class. Test all classes with 'qhulltest --all'" << endl;
86  }
88  return status;
89 }
90 
91 }//orgQhull
92 
93 int main(int argc, char *argv[])
94 {
95  return orgQhull::main(argc, argv); // Needs RoadTest:: for TESTadd_() linkage
96 }
97 
QHULL_LIB_CHECK
#define QHULL_LIB_CHECK
Definition: libqhull.h:462
orgQhull::add_QhullSet_test
void add_QhullSet_test()
Definition: QhullSet_test.cpp:43
orgQhull::RoadError::clearGlobalLog
static void clearGlobalLog()
Definition: RoadError.h:67
orgQhull
QhullRidge – Qhull's ridge structure, ridgeT, as a C++ class.
Definition: Coordinates.cpp:21
orgQhull::addQhullTests
void addQhullTests(QStringList &args)
Definition: qhulltest.cpp:30
TESTadd_
#define TESTadd_(t)
Definition: RoadTest.h:85
orgQhull::add_QhullFacet_test
void add_QhullFacet_test()
Definition: QhullFacet_test.cpp:47
orgQhull::add_QhullRidge_test
void add_QhullRidge_test()
Definition: QhullRidge_test.cpp:41
orgQhull::add_QhullVertex_test
void add_QhullVertex_test()
Definition: QhullVertex_test.cpp:44
orgQhull::add_Coordinates_test
void add_Coordinates_test()
Definition: Coordinates_test.cpp:47
doxygen_xml_parser.args
args
Definition: doxygen_xml_parser.py:887
orgQhull::RoadTest::deleteTests
static void deleteTests()
Definition: RoadTest.cpp:59
orgQhull::add_QhullFacetSet_test
void add_QhullFacetSet_test()
Definition: QhullFacetSet_test.cpp:42
orgQhull::add_PointCoordinates_test
void add_PointCoordinates_test()
Definition: PointCoordinates_test.cpp:47
qhull_ra.h
RoadError.h
orgQhull::add_QhullFacetList_test
void add_QhullFacetList_test()
Definition: QhullFacetList_test.cpp:45
orgQhull::add_QhullLinkedList_test
void add_QhullLinkedList_test()
Definition: QhullLinkedList_test.cpp:44
user_r.h
orgQhull::add_QhullPointSet_test
void add_QhullPointSet_test()
Definition: QhullPointSet_test.cpp:44
orgQhull::add_QhullHyperplane_test
void add_QhullHyperplane_test()
Definition: QhullHyperplane_test.cpp:53
orgQhull::add_QhullPoints_test
void add_QhullPoints_test()
Definition: QhullPoints_test.cpp:43
RoadTest.h
orgQhull::main
int main(int argc, char *argv[])
Definition: qhulltest.cpp:57
orgQhull::RoadError::emptyGlobalLog
static bool emptyGlobalLog()
Definition: RoadError.h:68
orgQhull::RoadTest::runTests
static int runTests(QStringList arguments)
Definition: RoadTest.cpp:68
orgQhull::add_RboxPoints_test
void add_RboxPoints_test()
Definition: RboxPoints_test.cpp:42
orgQhull::add_Qhull_test
void add_Qhull_test()
Definition: Qhull_test.cpp:44
orgQhull::add_QhullVertexSet_test
void add_QhullVertexSet_test()
Definition: QhullVertexSet_test.cpp:43
orgQhull::add_QhullPoint_test
void add_QhullPoint_test()
Definition: QhullPoint_test.cpp:51
orgQhull::RoadError::stringGlobalLog
static const char * stringGlobalLog()
Definition: RoadError.h:69
main
int main(int argc, char *argv[])
Definition: qhulltest.cpp:93


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