xmsgeom  1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
GmPolygon.t.h
Go to the documentation of this file.
1 #pragma once
2 #ifdef CXX_TEST
3 //------------------------------------------------------------------------------
9 //------------------------------------------------------------------------------
10 
11 //----- Included files ---------------------------------------------------------
12 // 3. Standard Library Headers
13 
14 // 4. External Library Headers
15 #include <xmscore/stl/vector.h>
16 #include <cxxtest/TestSuite.h>
17 
18 // 5. Shared Headers
19 
20 // 6. Non-shared Headers
21 
22 //----- Namespace declaration --------------------------------------------------
23 
24 //----- Forward declarations ---------------------------------------------------
25 
26 //----- Structs / Classes ------------------------------------------------------
27 
30 class GmPolygonUnitTests : public CxxTest::TestSuite
31 {
32 public:
33  void testNoHoles();
34  void testWithHoles();
36  void testIntersection();
37  void testUnion();
38 
39  static void SetUpPolyWithHoles1(xms::VecPt3d& a_outPoly,
40  xms::VecPt3d2d& a_inPolys,
41  xms::VecPt3d& a_ptsToTest);
42  static void SetUpPolyWithHole(xms::VecPt3d& a_outPoly, xms::VecPt3d& a_inPolys);
43 }; // GmPolygonUnitTests
44 
47 class GmPolygonIntermediateTests : public CxxTest::TestSuite
48 {
49 public:
50 #ifndef CXXTEST4
51  virtual const CxxTest::TestGroup& group();
52 #endif
53  void testSpeed();
54 }; // GmPolygonIntermediateTests
55 #endif
void testNoHoles()
Test a simple polygon with some points outside, some inside, some on, and some coincident with polygo...
Definition: GmPolygon.cpp:397
virtual const CxxTest::TestGroup & group()
Returns the test group.
Definition: GmPolygon.cpp:798
void testSpeed()
Test lots of points for timing purposes. Only in release, not debug.
Definition: GmPolygon.cpp:825
static void SetUpPolyWithHole(xms::VecPt3d &a_outPoly, xms::VecPt3d &a_inPolys)
Used in tests to create a polygon with lots of segments and 2 holes.
Definition: GmPolygon.cpp:625
void testIntersection()
tests intersection of polygons
Definition: GmPolygon.cpp:706
std::vector< VecPt3d > VecPt3d2d
static void SetUpPolyWithHoles1(xms::VecPt3d &a_outPoly, xms::VecPt3d2d &a_inPolys, xms::VecPt3d &a_ptsToTest)
Used in tests to create a polygon with two holes.
Definition: GmPolygon.cpp:569
void testUnion()
tests union of polygons
Definition: GmPolygon.cpp:743
std::vector< Pt3d > VecPt3d
Tests GmPolygon.
Definition: GmPolygon.t.h:30
Tests GmPolygonIntermediateTests.
Definition: GmPolygon.t.h:47
void testWithHoles()
Test a polygon with holes.
Definition: GmPolygon.cpp:485
void testMinDistanceToBoundary()
tests calculating the minimum distance to the boundary of a polygon.
Definition: GmPolygon.cpp:672