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 
66  addQhullTests(args);
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 
void add_Qhull_test()
Definition: Qhull_test.cpp:44
#define TESTadd_(t)
Definition: RoadTest.h:85
QhullRidge – Qhull&#39;s ridge structure, ridgeT, as a C++ class.
Definition: Coordinates.cpp:21
void add_QhullPoints_test()
void add_QhullFacetList_test()
void add_QhullVertex_test()
void add_QhullFacetSet_test()
void add_RboxPoints_test()
void add_QhullPoint_test()
void add_QhullSet_test()
static bool emptyGlobalLog()
Definition: RoadError.h:68
void add_QhullHyperplane_test()
void add_QhullVertexSet_test()
void add_PointCoordinates_test()
static int runTests(QStringList arguments)
Definition: RoadTest.cpp:68
void addQhullTests(QStringList &args)
Definition: qhulltest.cpp:30
static const char * stringGlobalLog()
Definition: RoadError.h:69
#define QHULL_LIB_CHECK
Definition: libqhull.h:462
void add_QhullFacet_test()
static void deleteTests()
Definition: RoadTest.cpp:59
void add_QhullLinkedList_test()
void add_Coordinates_test()
void add_QhullPointSet_test()
void add_QhullRidge_test()
static void clearGlobalLog()
Definition: RoadError.h:67
int main(int argc, char *argv[])
Definition: qhulltest.cpp:57


hpp-fcl
Author(s):
autogenerated on Fri Jun 2 2023 02:39:02