|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Comprehensive test suite for polygon.H - 2D polygon operations. More...
Go to the source code of this file.
Classes | |
| class | VertexTest |
| class | PolygonConstructionTest |
| class | PolygonExtremePointsTest |
| class | PolygonVertexAccessTest |
| class | PolygonSegmentAccessTest |
| class | PolygonVertexIteratorTest |
| class | PolygonSegmentIteratorTest |
| class | PolygonIntersectionTest |
| class | PolygonSelfIntersectionTest |
| class | PolygonColinearityTest |
| class | PolygonContainmentTest |
| class | PolygonRemoveVertexTest |
| class | PolygonFromTriangleTest |
| class | RegularPolygonConstructionTest |
| class | RegularPolygonVertexTest |
| class | RegularPolygonSegmentTest |
| class | RegularPolygonVertexIteratorTest |
| class | RegularPolygonSegmentIteratorTest |
| class | RegularPolygonExtremePointsTest |
| class | RegularPolygonRotationTest |
| class | PolygonFromRegularTest |
Functions | |
| bool | approx_equal (const Geom_Number &a, const Geom_Number &b, double tol=EPSILON) |
| bool | points_equal (const Point &a, const Point &b, double tol=EPSILON) |
| TEST_F (VertexTest, DefaultConstruction) | |
| TEST_F (VertexTest, ConstructFromPoint) | |
| TEST_F (VertexTest, CopyConstruction) | |
| TEST_F (VertexTest, CopyAssignment) | |
| TEST_F (VertexTest, SelfAssignment) | |
| TEST_F (VertexTest, ToPointReturnsCorrectPointValue) | |
| TEST_F (VertexTest, DlinkToVertexConversion) | |
| TEST_F (VertexTest, DlinkToVertexConstConversion) | |
| TEST_F (PolygonConstructionTest, DefaultConstruction) | |
| TEST_F (PolygonConstructionTest, AddSingleVertex) | |
| TEST_F (PolygonConstructionTest, AddMultipleVertices) | |
| TEST_F (PolygonConstructionTest, ClosePolygon) | |
| TEST_F (PolygonConstructionTest, CloseWithTooFewVerticesThrows) | |
| TEST_F (PolygonConstructionTest, CannotAddVertexToClosedPolygon) | |
| TEST_F (PolygonConstructionTest, CannotCloseAlreadyClosedPolygon) | |
| TEST_F (PolygonConstructionTest, CopyConstruction) | |
| TEST_F (PolygonConstructionTest, MoveConstruction) | |
| TEST_F (PolygonConstructionTest, CopyAssignment) | |
| TEST_F (PolygonConstructionTest, MoveAssignment) | |
| TEST_F (PolygonConstructionTest, SelfCopyAssignment) | |
| TEST_F (PolygonConstructionTest, AddVertexWithCoordinates) | |
| TEST_F (PolygonExtremePointsTest, ExtremePointsSingleVertex) | |
| TEST_F (PolygonExtremePointsTest, ExtremePointsMultipleVertices) | |
| TEST_F (PolygonExtremePointsTest, NegativeCoordinates) | |
| TEST_F (PolygonVertexAccessTest, GetFirstVertex) | |
| TEST_F (PolygonVertexAccessTest, GetLastVertex) | |
| TEST_F (PolygonVertexAccessTest, GetFirstVertexEmptyPolygonThrows) | |
| TEST_F (PolygonVertexAccessTest, GetLastVertexEmptyPolygonThrows) | |
| TEST_F (PolygonVertexAccessTest, VertexBelongsToPolygon) | |
| TEST_F (PolygonVertexAccessTest, VertexDoesNotBelongToPolygon) | |
| TEST_F (PolygonVertexAccessTest, GetNextVertex) | |
| TEST_F (PolygonVertexAccessTest, GetPrevVertex) | |
| TEST_F (PolygonSegmentAccessTest, GetFirstSegment) | |
| TEST_F (PolygonSegmentAccessTest, GetLastSegment) | |
| TEST_F (PolygonSegmentAccessTest, GetFirstSegmentSingleVertexThrows) | |
| TEST_F (PolygonSegmentAccessTest, GetFirstSegmentEmptyPolygonThrows) | |
| TEST_F (PolygonVertexIteratorTest, IterateAllVertices) | |
| TEST_F (PolygonVertexIteratorTest, GetCurrentVertex) | |
| TEST_F (PolygonVertexIteratorTest, EmptyPolygonThrows) | |
| TEST_F (PolygonSegmentIteratorTest, OpenPolygonIteratesNMinus1Segments) | |
| TEST_F (PolygonSegmentIteratorTest, ClosedPolygonIteratesNSegments) | |
| TEST_F (PolygonSegmentIteratorTest, GetCurrentSegment) | |
| TEST_F (PolygonSegmentIteratorTest, EmptyPolygonThrows) | |
| TEST_F (PolygonSegmentIteratorTest, SingleVertexPolygonThrows) | |
| TEST_F (PolygonIntersectionTest, SegmentIntersectsPolygon) | |
| TEST_F (PolygonIntersectionTest, SegmentDoesNotIntersectPolygon) | |
| TEST_F (PolygonIntersectionTest, SegmentInsidePolygon) | |
| TEST_F (PolygonSelfIntersectionTest, ValidPolygonConstruction) | |
| TEST_F (PolygonSelfIntersectionTest, SelfIntersectingVertexThrows) | |
| TEST_F (PolygonSelfIntersectionTest, SelfIntersectingAddVertexThrows) | |
| TEST_F (PolygonColinearityTest, ColinearPointExtendsEdge) | |
| TEST_F (PolygonColinearityTest, PointInsideLastSegmentThrows) | |
| TEST_F (PolygonContainmentTest, PointInsidePolygon) | |
| TEST_F (PolygonContainmentTest, PointOutsidePolygon) | |
| TEST_F (PolygonContainmentTest, PointNearEdge) | |
| TEST_F (PolygonContainmentTest, OpenPolygonContainmentThrows) | |
| TEST_F (PolygonRemoveVertexTest, RemoveExistingVertex) | |
| TEST_F (PolygonRemoveVertexTest, RemoveNonExistingVertexThrows) | |
| TEST_F (PolygonFromTriangleTest, ConstructFromTriangle) | |
| TEST_F (PolygonFromTriangleTest, CorrectVerticesFromTriangle) | |
| TEST_F (RegularPolygonConstructionTest, DefaultConstruction) | |
| TEST_F (RegularPolygonConstructionTest, ConstructTriangle) | |
| TEST_F (RegularPolygonConstructionTest, ConstructSquare) | |
| TEST_F (RegularPolygonConstructionTest, ConstructHexagon) | |
| TEST_F (RegularPolygonConstructionTest, LessThanThreeSidesThrows) | |
| TEST_F (RegularPolygonConstructionTest, RadiusCalculation) | |
| TEST_F (RegularPolygonVertexTest, GetVertexInRange) | |
| TEST_F (RegularPolygonVertexTest, GetVertexOutOfRangeThrows) | |
| TEST_F (RegularPolygonVertexTest, GetFirstVertex) | |
| TEST_F (RegularPolygonVertexTest, GetLastVertex) | |
| TEST_F (RegularPolygonVertexTest, VerticesAreEquidistantFromCenter) | |
| TEST_F (RegularPolygonSegmentTest, GetFirstSegment) | |
| TEST_F (RegularPolygonSegmentTest, GetLastSegment) | |
| TEST_F (RegularPolygonSegmentTest, AllSidesEqualLength) | |
| TEST_F (RegularPolygonVertexIteratorTest, IterateAllVertices) | |
| TEST_F (RegularPolygonVertexIteratorTest, GetCurrentVertex) | |
| TEST_F (RegularPolygonVertexIteratorTest, NextWithoutCurrent) | |
| TEST_F (RegularPolygonVertexIteratorTest, GetCurrentVertexWithoutCurrent) | |
| TEST_F (RegularPolygonSegmentIteratorTest, IterateAllSegments) | |
| TEST_F (RegularPolygonSegmentIteratorTest, GetCurrentSegment) | |
| TEST_F (RegularPolygonSegmentIteratorTest, NextWithoutCurrent) | |
| TEST_F (RegularPolygonSegmentIteratorTest, GetCurrentSegmentWithoutCurrent) | |
| TEST_F (RegularPolygonExtremePointsTest, LowestPoint) | |
| TEST_F (RegularPolygonExtremePointsTest, HighestPoint) | |
| TEST_F (RegularPolygonExtremePointsTest, LeftmostPoint) | |
| TEST_F (RegularPolygonExtremePointsTest, RightmostPoint) | |
| TEST_F (RegularPolygonRotationTest, NoRotation) | |
| TEST_F (RegularPolygonRotationTest, RotationChangesVertexPositions) | |
| TEST_F (RegularPolygonRotationTest, AllVerticesAtSameRadiusAfterRotation) | |
| TEST_F (PolygonFromRegularTest, ConstructFromRegularPolygon) | |
| TEST_F (PolygonFromRegularTest, AssignFromRegularPolygon) | |
| TEST_F (PolygonFromRegularTest, VerticesMatch) | |
| TEST (PolygonTypeTraits, MoveConstructorIsNoexcept) | |
| TEST (PolygonTypeTraits, MoveAssignmentIsNoexcept) | |
| TEST (PolygonEdgeCases, PolygonWithManyVertices) | |
| TEST (PolygonEdgeCases, RegularPolygonWithManyVertices) | |
| TEST (PolygonEdgeCases, VerySmallPolygon) | |
| TEST (PolygonEdgeCases, NegativeCoordinatesPolygon) | |
| TEST (PolygonConvenienceMethods, AreaOfUnitSquare) | |
| TEST (PolygonConvenienceMethods, AreaOfClockwiseSquare) | |
| TEST (PolygonConvenienceMethods, AreaOfTriangle) | |
| TEST (PolygonConvenienceMethods, PerimeterOfUnitSquare) | |
| TEST (PolygonConvenienceMethods, PerimeterOf345Triangle) | |
| TEST (PolygonConvenienceMethods, CentroidOfUnitSquare) | |
| TEST (PolygonConvenienceMethods, CentroidOfTriangle) | |
| TEST (PolygonConvenienceMethods, IsConvexSquare) | |
| TEST (PolygonConvenienceMethods, IsConvexTriangle) | |
| TEST (PolygonConvenienceMethods, NonConvexLShape) | |
| TEST (PolygonConvenienceMethods, AreaThrowsForTooFewVertices) | |
| TEST (PolygonConvenienceMethods, PerimeterThrowsForSingleVertex) | |
| TEST (PolygonConvenienceMethods, CentroidThrowsForTooFewVertices) | |
| TEST (PolygonConvenienceMethods, IsConvexThrowsForTooFewVertices) | |
| int | main (int argc, char **argv) |
Variables | |
| constexpr double | EPSILON = 1e-6 |
Comprehensive test suite for polygon.H - 2D polygon operations.
Tests cover:
Definition in file polygon_test.cc.
| bool approx_equal | ( | const Geom_Number & | a, |
| const Geom_Number & | b, | ||
| double | tol = EPSILON |
||
| ) |
Definition at line 57 of file polygon_test.cc.
References __gmp_expr< mpq_t, mpq_t >::get_d().
Referenced by points_equal(), and TEST_F().
| int main | ( | int | argc, |
| char ** | argv | ||
| ) |
Definition at line 1468 of file polygon_test.cc.
References Aleph::divide_and_conquer_partition_dp().
Definition at line 64 of file polygon_test.cc.
References approx_equal(), Aleph::Point::get_x(), and Aleph::Point::get_y().
Referenced by TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), and TEST_F().
| TEST | ( | PolygonConvenienceMethods | , |
| AreaOfClockwiseSquare | |||
| ) |
Definition at line 1316 of file polygon_test.cc.
References Aleph::Polygon::add_vertex(), Aleph::Polygon::area(), Aleph::Polygon::close(), Aleph::divide_and_conquer_partition_dp(), and Aleph::Polygon::signed_area().
| TEST | ( | PolygonConvenienceMethods | , |
| AreaOfTriangle | |||
| ) |
Definition at line 1329 of file polygon_test.cc.
References Aleph::Polygon::add_vertex(), Aleph::Polygon::area(), Aleph::Polygon::close(), and Aleph::divide_and_conquer_partition_dp().
| TEST | ( | PolygonConvenienceMethods | , |
| AreaOfUnitSquare | |||
| ) |
Definition at line 1303 of file polygon_test.cc.
References Aleph::Polygon::add_vertex(), Aleph::Polygon::area(), Aleph::Polygon::close(), Aleph::divide_and_conquer_partition_dp(), and Aleph::Polygon::signed_area().
| TEST | ( | PolygonConvenienceMethods | , |
| AreaThrowsForTooFewVertices | |||
| ) |
Definition at line 1429 of file polygon_test.cc.
References Aleph::Polygon::add_vertex(), Aleph::Polygon::area(), and Aleph::divide_and_conquer_partition_dp().
| TEST | ( | PolygonConvenienceMethods | , |
| CentroidOfTriangle | |||
| ) |
Definition at line 1378 of file polygon_test.cc.
References Aleph::Polygon::add_vertex(), Aleph::Polygon::centroid(), Aleph::Polygon::close(), Aleph::divide_and_conquer_partition_dp(), Aleph::Point::get_x(), and Aleph::Point::get_y().
| TEST | ( | PolygonConvenienceMethods | , |
| CentroidOfUnitSquare | |||
| ) |
Definition at line 1364 of file polygon_test.cc.
References Aleph::Polygon::add_vertex(), Aleph::Polygon::centroid(), Aleph::Polygon::close(), Aleph::divide_and_conquer_partition_dp(), Aleph::Point::get_x(), and Aleph::Point::get_y().
| TEST | ( | PolygonConvenienceMethods | , |
| CentroidThrowsForTooFewVertices | |||
| ) |
Definition at line 1446 of file polygon_test.cc.
References Aleph::Polygon::add_vertex(), Aleph::Polygon::centroid(), and Aleph::divide_and_conquer_partition_dp().
| TEST | ( | PolygonConvenienceMethods | , |
| IsConvexSquare | |||
| ) |
Definition at line 1391 of file polygon_test.cc.
References Aleph::Polygon::add_vertex(), Aleph::Polygon::close(), Aleph::divide_and_conquer_partition_dp(), and Aleph::Polygon::is_convex().
| TEST | ( | PolygonConvenienceMethods | , |
| IsConvexThrowsForTooFewVertices | |||
| ) |
Definition at line 1455 of file polygon_test.cc.
References Aleph::Polygon::add_vertex(), Aleph::divide_and_conquer_partition_dp(), and Aleph::Polygon::is_convex().
| TEST | ( | PolygonConvenienceMethods | , |
| IsConvexTriangle | |||
| ) |
Definition at line 1403 of file polygon_test.cc.
References Aleph::Polygon::add_vertex(), Aleph::Polygon::close(), Aleph::divide_and_conquer_partition_dp(), and Aleph::Polygon::is_convex().
| TEST | ( | PolygonConvenienceMethods | , |
| NonConvexLShape | |||
| ) |
Definition at line 1414 of file polygon_test.cc.
References Aleph::Polygon::add_vertex(), and Aleph::divide_and_conquer_partition_dp().
| TEST | ( | PolygonConvenienceMethods | , |
| PerimeterOf345Triangle | |||
| ) |
Definition at line 1352 of file polygon_test.cc.
References Aleph::Polygon::add_vertex(), Aleph::Polygon::close(), Aleph::divide_and_conquer_partition_dp(), and Aleph::Polygon::perimeter().
| TEST | ( | PolygonConvenienceMethods | , |
| PerimeterOfUnitSquare | |||
| ) |
Definition at line 1340 of file polygon_test.cc.
References Aleph::Polygon::add_vertex(), Aleph::Polygon::close(), Aleph::divide_and_conquer_partition_dp(), and Aleph::Polygon::perimeter().
| TEST | ( | PolygonConvenienceMethods | , |
| PerimeterThrowsForSingleVertex | |||
| ) |
Definition at line 1438 of file polygon_test.cc.
References Aleph::Polygon::add_vertex(), and Aleph::divide_and_conquer_partition_dp().
| TEST | ( | PolygonEdgeCases | , |
| NegativeCoordinatesPolygon | |||
| ) |
Definition at line 1286 of file polygon_test.cc.
References Aleph::Polygon::add_vertex(), Aleph::Polygon::close(), Aleph::Polygon::contains(), and Aleph::divide_and_conquer_partition_dp().
| TEST | ( | PolygonEdgeCases | , |
| PolygonWithManyVertices | |||
| ) |
Definition at line 1233 of file polygon_test.cc.
References Aleph::Polygon::add_vertex(), Aleph::Polygon::close(), Aleph::Polygon::contains(), cos(), Aleph::divide_and_conquer_partition_dp(), Aleph::Polygon::is_closed(), N, Aleph::PI, sin(), Aleph::Polygon::size(), and y.
| TEST | ( | PolygonEdgeCases | , |
| RegularPolygonWithManyVertices | |||
| ) |
Definition at line 1256 of file polygon_test.cc.
References Aleph::divide_and_conquer_partition_dp(), __gmp_expr< mpq_t, mpq_t >::get_d(), Aleph::Regular_Polygon::get_vertex(), Aleph::Point::get_x(), Aleph::Point::get_y(), r, Aleph::Regular_Polygon::radius(), and Aleph::Regular_Polygon::size().
| TEST | ( | PolygonEdgeCases | , |
| VerySmallPolygon | |||
| ) |
Definition at line 1274 of file polygon_test.cc.
References Aleph::Polygon::add_vertex(), Aleph::Polygon::close(), Aleph::divide_and_conquer_partition_dp(), Aleph::Polygon::is_closed(), and Aleph::Polygon::size().
| TEST | ( | PolygonTypeTraits | , |
| MoveAssignmentIsNoexcept | |||
| ) |
Definition at line 1224 of file polygon_test.cc.
References Aleph::divide_and_conquer_partition_dp().
| TEST | ( | PolygonTypeTraits | , |
| MoveConstructorIsNoexcept | |||
| ) |
Definition at line 1219 of file polygon_test.cc.
References Aleph::divide_and_conquer_partition_dp().
| TEST_F | ( | PolygonColinearityTest | , |
| ColinearPointExtendsEdge | |||
| ) |
Definition at line 675 of file polygon_test.cc.
References Aleph::Polygon::add_vertex(), Aleph::divide_and_conquer_partition_dp(), and Aleph::Polygon::size().
| TEST_F | ( | PolygonColinearityTest | , |
| PointInsideLastSegmentThrows | |||
| ) |
Definition at line 686 of file polygon_test.cc.
References Aleph::Polygon::add_vertex(), and Aleph::divide_and_conquer_partition_dp().
| TEST_F | ( | PolygonConstructionTest | , |
| AddMultipleVertices | |||
| ) |
Definition at line 203 of file polygon_test.cc.
References Aleph::Polygon::add_vertex(), Aleph::divide_and_conquer_partition_dp(), Aleph::Polygon::is_closed(), and Aleph::Polygon::size().
| TEST_F | ( | PolygonConstructionTest | , |
| AddSingleVertex | |||
| ) |
Definition at line 194 of file polygon_test.cc.
References Aleph::Polygon::add_vertex(), Aleph::divide_and_conquer_partition_dp(), Aleph::Polygon::is_closed(), and Aleph::Polygon::size().
| TEST_F | ( | PolygonConstructionTest | , |
| AddVertexWithCoordinates | |||
| ) |
Definition at line 305 of file polygon_test.cc.
References Aleph::Polygon::add_vertex(), Aleph::divide_and_conquer_partition_dp(), Aleph::Polygon::get_first_vertex(), Aleph::Point::get_x(), Aleph::Point::get_y(), and Aleph::Polygon::size().
| TEST_F | ( | PolygonConstructionTest | , |
| CannotAddVertexToClosedPolygon | |||
| ) |
Definition at line 237 of file polygon_test.cc.
References Aleph::Polygon::add_vertex(), create_triangle(), and Aleph::divide_and_conquer_partition_dp().
| TEST_F | ( | PolygonConstructionTest | , |
| CannotCloseAlreadyClosedPolygon | |||
| ) |
Definition at line 244 of file polygon_test.cc.
References Aleph::Polygon::close(), create_triangle(), and Aleph::divide_and_conquer_partition_dp().
| TEST_F | ( | PolygonConstructionTest | , |
| ClosePolygon | |||
| ) |
Definition at line 214 of file polygon_test.cc.
References create_triangle(), Aleph::divide_and_conquer_partition_dp(), Aleph::Polygon::is_closed(), and Aleph::Polygon::size().
| TEST_F | ( | PolygonConstructionTest | , |
| CloseWithTooFewVerticesThrows | |||
| ) |
Definition at line 222 of file polygon_test.cc.
References Aleph::Polygon::add_vertex(), Aleph::Polygon::close(), and Aleph::divide_and_conquer_partition_dp().
| TEST_F | ( | PolygonConstructionTest | , |
| CopyAssignment | |||
| ) |
Definition at line 273 of file polygon_test.cc.
References create_triangle(), and Aleph::divide_and_conquer_partition_dp().
| TEST_F | ( | PolygonConstructionTest | , |
| CopyConstruction | |||
| ) |
Definition at line 251 of file polygon_test.cc.
References Aleph::copy(), Aleph::divide_and_conquer_partition_dp(), and points_equal().
| TEST_F | ( | PolygonConstructionTest | , |
| DefaultConstruction | |||
| ) |
Definition at line 187 of file polygon_test.cc.
References Aleph::divide_and_conquer_partition_dp(), Aleph::Polygon::is_closed(), and Aleph::Polygon::size().
| TEST_F | ( | PolygonConstructionTest | , |
| MoveAssignment | |||
| ) |
Definition at line 284 of file polygon_test.cc.
References Aleph::divide_and_conquer_partition_dp().
| TEST_F | ( | PolygonConstructionTest | , |
| MoveConstruction | |||
| ) |
Definition at line 261 of file polygon_test.cc.
References Aleph::divide_and_conquer_partition_dp().
| TEST_F | ( | PolygonConstructionTest | , |
| SelfCopyAssignment | |||
| ) |
Definition at line 296 of file polygon_test.cc.
References Aleph::divide_and_conquer_partition_dp(), Aleph::Polygon::is_closed(), and Aleph::Polygon::size().
| TEST_F | ( | PolygonContainmentTest | , |
| OpenPolygonContainmentThrows | |||
| ) |
Definition at line 734 of file polygon_test.cc.
References Aleph::Polygon::add_vertex(), Aleph::Polygon::contains(), and Aleph::divide_and_conquer_partition_dp().
| TEST_F | ( | PolygonContainmentTest | , |
| PointInsidePolygon | |||
| ) |
Definition at line 716 of file polygon_test.cc.
References Aleph::divide_and_conquer_partition_dp().
| TEST_F | ( | PolygonContainmentTest | , |
| PointNearEdge | |||
| ) |
Definition at line 728 of file polygon_test.cc.
References Aleph::divide_and_conquer_partition_dp().
| TEST_F | ( | PolygonContainmentTest | , |
| PointOutsidePolygon | |||
| ) |
Definition at line 722 of file polygon_test.cc.
References Aleph::divide_and_conquer_partition_dp().
| TEST_F | ( | PolygonExtremePointsTest | , |
| ExtremePointsMultipleVertices | |||
| ) |
Definition at line 333 of file polygon_test.cc.
References Aleph::Polygon::add_vertex(), Aleph::divide_and_conquer_partition_dp(), Aleph::Point::get_x(), Aleph::Point::get_y(), Aleph::Polygon::highest_point(), Aleph::Polygon::leftmost_point(), Aleph::Polygon::lowest_point(), and Aleph::Polygon::rightmost_point().
| TEST_F | ( | PolygonExtremePointsTest | , |
| ExtremePointsSingleVertex | |||
| ) |
Definition at line 321 of file polygon_test.cc.
References Aleph::Polygon::add_vertex(), Aleph::divide_and_conquer_partition_dp(), Aleph::Point::get_x(), Aleph::Point::get_y(), Aleph::Polygon::highest_point(), Aleph::Polygon::leftmost_point(), Aleph::Polygon::lowest_point(), and Aleph::Polygon::rightmost_point().
| TEST_F | ( | PolygonExtremePointsTest | , |
| NegativeCoordinates | |||
| ) |
Definition at line 347 of file polygon_test.cc.
References Aleph::Polygon::add_vertex(), Aleph::divide_and_conquer_partition_dp(), Aleph::Point::get_x(), Aleph::Point::get_y(), Aleph::Polygon::highest_point(), Aleph::Polygon::leftmost_point(), Aleph::Polygon::lowest_point(), and Aleph::Polygon::rightmost_point().
| TEST_F | ( | PolygonFromRegularTest | , |
| AssignFromRegularPolygon | |||
| ) |
Definition at line 1186 of file polygon_test.cc.
References Aleph::divide_and_conquer_partition_dp(), Aleph::Polygon::is_closed(), and Aleph::Polygon::size().
| TEST_F | ( | PolygonFromRegularTest | , |
| ConstructFromRegularPolygon | |||
| ) |
Definition at line 1177 of file polygon_test.cc.
References Aleph::divide_and_conquer_partition_dp(), Aleph::Polygon::is_closed(), and Aleph::Polygon::size().
| TEST_F | ( | PolygonFromRegularTest | , |
| VerticesMatch | |||
| ) |
Definition at line 1197 of file polygon_test.cc.
References Aleph::divide_and_conquer_partition_dp(), Aleph::Regular_Polygon::get_vertex(), Aleph::Dlink::Iterator::has_curr(), points_equal(), Aleph::Polygon::size(), and Aleph::Regular_Polygon::size().
| TEST_F | ( | PolygonFromTriangleTest | , |
| ConstructFromTriangle | |||
| ) |
Definition at line 782 of file polygon_test.cc.
References Aleph::divide_and_conquer_partition_dp(), Aleph::Polygon::is_closed(), and Aleph::Polygon::size().
| TEST_F | ( | PolygonFromTriangleTest | , |
| CorrectVerticesFromTriangle | |||
| ) |
Definition at line 791 of file polygon_test.cc.
References Aleph::Polygon::contains(), Aleph::divide_and_conquer_partition_dp(), Aleph::Polygon::is_closed(), and Aleph::Polygon::size().
| TEST_F | ( | PolygonIntersectionTest | , |
| SegmentDoesNotIntersectPolygon | |||
| ) |
Definition at line 611 of file polygon_test.cc.
References Aleph::divide_and_conquer_partition_dp().
| TEST_F | ( | PolygonIntersectionTest | , |
| SegmentInsidePolygon | |||
| ) |
Definition at line 617 of file polygon_test.cc.
References Aleph::divide_and_conquer_partition_dp().
| TEST_F | ( | PolygonIntersectionTest | , |
| SegmentIntersectsPolygon | |||
| ) |
Definition at line 605 of file polygon_test.cc.
References Aleph::divide_and_conquer_partition_dp().
| TEST_F | ( | PolygonRemoveVertexTest | , |
| RemoveExistingVertex | |||
| ) |
Definition at line 762 of file polygon_test.cc.
References Aleph::divide_and_conquer_partition_dp().
| TEST_F | ( | PolygonRemoveVertexTest | , |
| RemoveNonExistingVertexThrows | |||
| ) |
Definition at line 770 of file polygon_test.cc.
References Aleph::divide_and_conquer_partition_dp().
| TEST_F | ( | PolygonSegmentAccessTest | , |
| GetFirstSegment | |||
| ) |
Definition at line 452 of file polygon_test.cc.
References Aleph::divide_and_conquer_partition_dp(), Aleph::Segment::get_src_point(), Aleph::Segment::get_tgt_point(), and points_equal().
| TEST_F | ( | PolygonSegmentAccessTest | , |
| GetFirstSegmentEmptyPolygonThrows | |||
| ) |
Definition at line 476 of file polygon_test.cc.
References Aleph::divide_and_conquer_partition_dp(), and Aleph::Polygon::get_first_segment().
| TEST_F | ( | PolygonSegmentAccessTest | , |
| GetFirstSegmentSingleVertexThrows | |||
| ) |
Definition at line 468 of file polygon_test.cc.
References Aleph::Polygon::add_vertex(), and Aleph::divide_and_conquer_partition_dp().
| TEST_F | ( | PolygonSegmentAccessTest | , |
| GetLastSegment | |||
| ) |
Definition at line 460 of file polygon_test.cc.
References Aleph::divide_and_conquer_partition_dp(), Aleph::Segment::get_src_point(), Aleph::Segment::get_tgt_point(), and points_equal().
| TEST_F | ( | PolygonSegmentIteratorTest | , |
| ClosedPolygonIteratesNSegments | |||
| ) |
Definition at line 552 of file polygon_test.cc.
References Aleph::count(), Aleph::divide_and_conquer_partition_dp(), and Aleph::Polygon::Segment_Iterator::has_curr().
| TEST_F | ( | PolygonSegmentIteratorTest | , |
| EmptyPolygonThrows | |||
| ) |
Definition at line 572 of file polygon_test.cc.
References Aleph::divide_and_conquer_partition_dp().
| TEST_F | ( | PolygonSegmentIteratorTest | , |
| GetCurrentSegment | |||
| ) |
Definition at line 563 of file polygon_test.cc.
References Aleph::divide_and_conquer_partition_dp(), Aleph::Polygon::Segment_Iterator::get_current_segment(), Aleph::Segment::get_src_point(), Aleph::Segment::get_tgt_point(), and points_equal().
| TEST_F | ( | PolygonSegmentIteratorTest | , |
| OpenPolygonIteratesNMinus1Segments | |||
| ) |
Definition at line 542 of file polygon_test.cc.
References Aleph::count(), Aleph::divide_and_conquer_partition_dp(), and Aleph::Polygon::Segment_Iterator::has_curr().
| TEST_F | ( | PolygonSegmentIteratorTest | , |
| SingleVertexPolygonThrows | |||
| ) |
Definition at line 578 of file polygon_test.cc.
References Aleph::Polygon::add_vertex(), and Aleph::divide_and_conquer_partition_dp().
| TEST_F | ( | PolygonSelfIntersectionTest | , |
| SelfIntersectingAddVertexThrows | |||
| ) |
Definition at line 653 of file polygon_test.cc.
References Aleph::Polygon::add_vertex(), and Aleph::divide_and_conquer_partition_dp().
| TEST_F | ( | PolygonSelfIntersectionTest | , |
| SelfIntersectingVertexThrows | |||
| ) |
Definition at line 641 of file polygon_test.cc.
References Aleph::Polygon::add_vertex(), and Aleph::divide_and_conquer_partition_dp().
| TEST_F | ( | PolygonSelfIntersectionTest | , |
| ValidPolygonConstruction | |||
| ) |
Definition at line 629 of file polygon_test.cc.
References Aleph::Polygon::add_vertex(), Aleph::Polygon::close(), and Aleph::divide_and_conquer_partition_dp().
| TEST_F | ( | PolygonVertexAccessTest | , |
| GetFirstVertex | |||
| ) |
Definition at line 379 of file polygon_test.cc.
References Aleph::divide_and_conquer_partition_dp(), Aleph::Point::get_x(), and Aleph::Point::get_y().
| TEST_F | ( | PolygonVertexAccessTest | , |
| GetFirstVertexEmptyPolygonThrows | |||
| ) |
Definition at line 393 of file polygon_test.cc.
References Aleph::divide_and_conquer_partition_dp(), and Aleph::Polygon::get_first_vertex().
| TEST_F | ( | PolygonVertexAccessTest | , |
| GetLastVertex | |||
| ) |
Definition at line 386 of file polygon_test.cc.
References Aleph::divide_and_conquer_partition_dp(), Aleph::Point::get_x(), and Aleph::Point::get_y().
| TEST_F | ( | PolygonVertexAccessTest | , |
| GetLastVertexEmptyPolygonThrows | |||
| ) |
Definition at line 399 of file polygon_test.cc.
References Aleph::divide_and_conquer_partition_dp(), and Aleph::Polygon::get_last_vertex().
| TEST_F | ( | PolygonVertexAccessTest | , |
| GetNextVertex | |||
| ) |
Definition at line 417 of file polygon_test.cc.
References Aleph::divide_and_conquer_partition_dp(), and Aleph::next().
| TEST_F | ( | PolygonVertexAccessTest | , |
| GetPrevVertex | |||
| ) |
Definition at line 426 of file polygon_test.cc.
References Aleph::divide_and_conquer_partition_dp(), Aleph::Point::get_x(), and Aleph::Point::get_y().
| TEST_F | ( | PolygonVertexAccessTest | , |
| VertexBelongsToPolygon | |||
| ) |
Definition at line 405 of file polygon_test.cc.
References Aleph::divide_and_conquer_partition_dp().
| TEST_F | ( | PolygonVertexAccessTest | , |
| VertexDoesNotBelongToPolygon | |||
| ) |
Definition at line 411 of file polygon_test.cc.
References Aleph::divide_and_conquer_partition_dp().
| TEST_F | ( | PolygonVertexIteratorTest | , |
| EmptyPolygonThrows | |||
| ) |
Definition at line 518 of file polygon_test.cc.
References Aleph::divide_and_conquer_partition_dp().
| TEST_F | ( | PolygonVertexIteratorTest | , |
| GetCurrentVertex | |||
| ) |
Definition at line 509 of file polygon_test.cc.
References Aleph::divide_and_conquer_partition_dp(), Aleph::Polygon::Vertex_Iterator::get_current_vertex(), Aleph::Point::get_x(), and Aleph::Point::get_y().
| TEST_F | ( | PolygonVertexIteratorTest | , |
| IterateAllVertices | |||
| ) |
Definition at line 500 of file polygon_test.cc.
References Aleph::count(), Aleph::divide_and_conquer_partition_dp(), and Aleph::Dlink::Iterator::has_curr().
| TEST_F | ( | RegularPolygonConstructionTest | , |
| ConstructHexagon | |||
| ) |
Definition at line 835 of file polygon_test.cc.
References Aleph::divide_and_conquer_partition_dp(), Aleph::Regular_Polygon::get_center(), points_equal(), and Aleph::Regular_Polygon::size().
| TEST_F | ( | RegularPolygonConstructionTest | , |
| ConstructSquare | |||
| ) |
Definition at line 827 of file polygon_test.cc.
References Aleph::divide_and_conquer_partition_dp(), EPSILON, Aleph::Regular_Polygon::get_side_size(), and Aleph::Regular_Polygon::size().
| TEST_F | ( | RegularPolygonConstructionTest | , |
| ConstructTriangle | |||
| ) |
Definition at line 818 of file polygon_test.cc.
References Aleph::divide_and_conquer_partition_dp(), EPSILON, Aleph::Regular_Polygon::get_side_size(), Aleph::Regular_Polygon::is_closed(), and Aleph::Regular_Polygon::size().
| TEST_F | ( | RegularPolygonConstructionTest | , |
| DefaultConstruction | |||
| ) |
Definition at line 811 of file polygon_test.cc.
References Aleph::divide_and_conquer_partition_dp(), Aleph::Regular_Polygon::get_side_size(), and Aleph::Regular_Polygon::size().
| TEST_F | ( | RegularPolygonConstructionTest | , |
| LessThanThreeSidesThrows | |||
| ) |
Definition at line 843 of file polygon_test.cc.
References Aleph::divide_and_conquer_partition_dp().
| TEST_F | ( | RegularPolygonConstructionTest | , |
| RadiusCalculation | |||
| ) |
Definition at line 850 of file polygon_test.cc.
References Aleph::divide_and_conquer_partition_dp(), EPSILON, and Aleph::Regular_Polygon::radius().
| TEST_F | ( | RegularPolygonExtremePointsTest | , |
| HighestPoint | |||
| ) |
Definition at line 1099 of file polygon_test.cc.
References Aleph::divide_and_conquer_partition_dp(), Aleph::Point::highest_point(), points_equal(), and r.
| TEST_F | ( | RegularPolygonExtremePointsTest | , |
| LeftmostPoint | |||
| ) |
Definition at line 1108 of file polygon_test.cc.
References Aleph::divide_and_conquer_partition_dp(), Aleph::Point::leftmost_point(), points_equal(), and r.
| TEST_F | ( | RegularPolygonExtremePointsTest | , |
| LowestPoint | |||
| ) |
Definition at line 1090 of file polygon_test.cc.
References Aleph::divide_and_conquer_partition_dp(), Aleph::Point::lowest_point(), points_equal(), and r.
| TEST_F | ( | RegularPolygonExtremePointsTest | , |
| RightmostPoint | |||
| ) |
Definition at line 1117 of file polygon_test.cc.
References Aleph::divide_and_conquer_partition_dp(), points_equal(), r, and Aleph::Point::rightmost_point().
| TEST_F | ( | RegularPolygonRotationTest | , |
| AllVerticesAtSameRadiusAfterRotation | |||
| ) |
Definition at line 1155 of file polygon_test.cc.
References Aleph::divide_and_conquer_partition_dp(), __gmp_expr< mpq_t, mpq_t >::get_d(), Aleph::Regular_Polygon::get_vertex(), Aleph::Point::get_x(), Aleph::Point::get_y(), Aleph::PI, r, Aleph::Regular_Polygon::radius(), and Aleph::Regular_Polygon::size().
| TEST_F | ( | RegularPolygonRotationTest | , |
| NoRotation | |||
| ) |
Definition at line 1132 of file polygon_test.cc.
References Aleph::divide_and_conquer_partition_dp(), and Aleph::Regular_Polygon::get_vertex().
| TEST_F | ( | RegularPolygonRotationTest | , |
| RotationChangesVertexPositions | |||
| ) |
Definition at line 1142 of file polygon_test.cc.
References approx_equal(), Aleph::divide_and_conquer_partition_dp(), and Aleph::PI.
| TEST_F | ( | RegularPolygonSegmentIteratorTest | , |
| GetCurrentSegment | |||
| ) |
Definition at line 1043 of file polygon_test.cc.
References Aleph::divide_and_conquer_partition_dp(), Aleph::Regular_Polygon::Segment_Iterator::get_current_segment(), Aleph::Segment::get_src_point(), Aleph::Segment::get_tgt_point(), and points_equal().
| TEST_F | ( | RegularPolygonSegmentIteratorTest | , |
| GetCurrentSegmentWithoutCurrent | |||
| ) |
Definition at line 1065 of file polygon_test.cc.
References Aleph::divide_and_conquer_partition_dp(), Aleph::Regular_Polygon::Segment_Iterator::get_current_segment(), and Aleph::Regular_Polygon::Segment_Iterator::next_ne().
| TEST_F | ( | RegularPolygonSegmentIteratorTest | , |
| IterateAllSegments | |||
| ) |
Definition at line 1034 of file polygon_test.cc.
References Aleph::count(), Aleph::divide_and_conquer_partition_dp(), and Aleph::Regular_Polygon::Segment_Iterator::has_curr().
| TEST_F | ( | RegularPolygonSegmentIteratorTest | , |
| NextWithoutCurrent | |||
| ) |
| TEST_F | ( | RegularPolygonSegmentTest | , |
| AllSidesEqualLength | |||
| ) |
Definition at line 953 of file polygon_test.cc.
References Aleph::divide_and_conquer_partition_dp(), __gmp_expr< mpq_t, mpq_t >::get_d(), and Aleph::Segment::length().
| TEST_F | ( | RegularPolygonSegmentTest | , |
| GetFirstSegment | |||
| ) |
Definition at line 933 of file polygon_test.cc.
References Aleph::divide_and_conquer_partition_dp(), Aleph::Segment::get_src_point(), Aleph::Segment::get_tgt_point(), and points_equal().
| TEST_F | ( | RegularPolygonSegmentTest | , |
| GetLastSegment | |||
| ) |
Definition at line 943 of file polygon_test.cc.
References Aleph::divide_and_conquer_partition_dp(), Aleph::Segment::get_src_point(), Aleph::Segment::get_tgt_point(), and points_equal().
| TEST_F | ( | RegularPolygonVertexIteratorTest | , |
| GetCurrentVertex | |||
| ) |
Definition at line 991 of file polygon_test.cc.
References Aleph::divide_and_conquer_partition_dp(), Aleph::Regular_Polygon::Vertex_Iterator::get_current_vertex(), and points_equal().
| TEST_F | ( | RegularPolygonVertexIteratorTest | , |
| GetCurrentVertexWithoutCurrent | |||
| ) |
Definition at line 1010 of file polygon_test.cc.
References Aleph::divide_and_conquer_partition_dp(), Aleph::Regular_Polygon::Vertex_Iterator::get_current_vertex(), and Aleph::Regular_Polygon::Vertex_Iterator::next_ne().
| TEST_F | ( | RegularPolygonVertexIteratorTest | , |
| IterateAllVertices | |||
| ) |
Definition at line 982 of file polygon_test.cc.
References Aleph::count(), Aleph::divide_and_conquer_partition_dp(), and Aleph::Regular_Polygon::Vertex_Iterator::has_curr().
| TEST_F | ( | RegularPolygonVertexIteratorTest | , |
| NextWithoutCurrent | |||
| ) |
Definition at line 1000 of file polygon_test.cc.
References Aleph::divide_and_conquer_partition_dp(), Aleph::Regular_Polygon::Vertex_Iterator::has_curr(), Aleph::Regular_Polygon::Vertex_Iterator::next(), and Aleph::Regular_Polygon::Vertex_Iterator::next_ne().
| TEST_F | ( | RegularPolygonVertexTest | , |
| GetFirstVertex | |||
| ) |
Definition at line 885 of file polygon_test.cc.
References Aleph::divide_and_conquer_partition_dp(), and points_equal().
| TEST_F | ( | RegularPolygonVertexTest | , |
| GetLastVertex | |||
| ) |
Definition at line 893 of file polygon_test.cc.
References Aleph::divide_and_conquer_partition_dp(), and points_equal().
| TEST_F | ( | RegularPolygonVertexTest | , |
| GetVertexInRange | |||
| ) |
Definition at line 873 of file polygon_test.cc.
References Aleph::divide_and_conquer_partition_dp().
| TEST_F | ( | RegularPolygonVertexTest | , |
| GetVertexOutOfRangeThrows | |||
| ) |
Definition at line 879 of file polygon_test.cc.
References Aleph::divide_and_conquer_partition_dp().
| TEST_F | ( | RegularPolygonVertexTest | , |
| VerticesAreEquidistantFromCenter | |||
| ) |
Definition at line 901 of file polygon_test.cc.
References Aleph::divide_and_conquer_partition_dp(), EPSILON, __gmp_expr< mpq_t, mpq_t >::get_d(), Aleph::Point::get_x(), Aleph::Point::get_y(), and r.
| TEST_F | ( | VertexTest | , |
| ConstructFromPoint | |||
| ) |
Definition at line 93 of file polygon_test.cc.
References Aleph::divide_and_conquer_partition_dp(), Aleph::Point::get_x(), and Aleph::Point::get_y().
| TEST_F | ( | VertexTest | , |
| CopyAssignment | |||
| ) |
Definition at line 109 of file polygon_test.cc.
References Aleph::divide_and_conquer_partition_dp(), Aleph::Point::get_x(), and Aleph::Point::get_y().
| TEST_F | ( | VertexTest | , |
| CopyConstruction | |||
| ) |
Definition at line 100 of file polygon_test.cc.
References Aleph::divide_and_conquer_partition_dp(), Aleph::Point::get_x(), and Aleph::Point::get_y().
| TEST_F | ( | VertexTest | , |
| DefaultConstruction | |||
| ) |
Definition at line 86 of file polygon_test.cc.
References Aleph::divide_and_conquer_partition_dp(), Aleph::Point::get_x(), and Aleph::Point::get_y().
| TEST_F | ( | VertexTest | , |
| DlinkToVertexConstConversion | |||
| ) |
Definition at line 148 of file polygon_test.cc.
References Aleph::divide_and_conquer_partition_dp(), and Aleph::Vertex::dlink_to_vertex().
| TEST_F | ( | VertexTest | , |
| DlinkToVertexConversion | |||
| ) |
Definition at line 138 of file polygon_test.cc.
References Aleph::divide_and_conquer_partition_dp(), and Aleph::Vertex::dlink_to_vertex().
| TEST_F | ( | VertexTest | , |
| SelfAssignment | |||
| ) |
Definition at line 120 of file polygon_test.cc.
References Aleph::divide_and_conquer_partition_dp(), Aleph::Point::get_x(), and Aleph::Point::get_y().
| TEST_F | ( | VertexTest | , |
| ToPointReturnsCorrectPointValue | |||
| ) |
Definition at line 129 of file polygon_test.cc.
References Aleph::divide_and_conquer_partition_dp(), Aleph::Point::get_x(), Aleph::Point::get_y(), and Aleph::Vertex::to_point().