xmsgrid  1.0
GmPolygon.t.h
Go to the documentation of this file.
1 #pragma once
2 #ifdef CXX_TEST
3 //------------------------------------------------------------------------------
8 //------------------------------------------------------------------------------
9 
10 //----- Included files ---------------------------------------------------------
11 // 3. Standard Library Headers
12 
13 // 4. External Library Headers
14 #include <xmscore/stl/vector.h>
15 #include <cxxtest/TestSuite.h>
16 
17 // 5. Shared Headers
18 
19 // 6. Non-shared Headers
20 
21 //----- Namespace declaration --------------------------------------------------
22 
23 //----- Forward declarations ---------------------------------------------------
24 
25 //----- Structs / Classes ------------------------------------------------------
26 
29 class GmPolygonUnitTests : public CxxTest::TestSuite
30 {
31 public:
32  void testNoHoles();
33  void testWithHoles();
35  void testIntersection();
36  void testUnion();
37 
38  static void SetUpPolyWithHoles1(xms::VecPt3d& a_outPoly,
39  xms::VecPt3d2d& a_inPolys,
40  xms::VecPt3d& a_ptsToTest);
41  static void SetUpPolyWithHole(xms::VecPt3d& a_outPoly, xms::VecPt3d& a_inPolys);
42 }; // GmPolygonUnitTests
43 
46 class GmPolygonIntermediateTests : public CxxTest::TestSuite
47 {
48 public:
49  void testSpeed();
50 }; // GmPolygonIntermediateTests
51 #endif
void testNoHoles()
Test a simple polygon with some points outside, some inside, some on, and some coincident with polygo...
Definition: GmPolygon.cpp:396
void testSpeed()
Test lots of points for timing purposes. Only in release, not debug.
Definition: GmPolygon.cpp:813
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:624
void testIntersection()
tests intersection of polygons
Definition: GmPolygon.cpp:705
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:568
void testUnion()
tests union of polygons
Definition: GmPolygon.cpp:742
Tests GmPolygon.
Definition: GmPolygon.t.h:29
Tests GmPolygonIntermediateTests.
Definition: GmPolygon.t.h:46
void testWithHoles()
Test a polygon with holes.
Definition: GmPolygon.cpp:484
void testMinDistanceToBoundary()
tests calculating the minimum distance to the boundary of a polygon.
Definition: GmPolygon.cpp:671