|
KiCad PCB EDA Suite
|
#include <qa_utils/wx_utils/unit_test_utils.h>#include <cmath>#include <geometry/arc_construction.h>#include <math/util.h>Go to the source code of this file.
Functions | |
| BOOST_AUTO_TEST_CASE (ProjectLandsOnBisector) | |
| BOOST_AUTO_TEST_CASE (ThroughPointsQuarterCircle) | |
| BOOST_AUTO_TEST_CASE (ThroughPointsMajorArcMidIsHalfway) | |
| BOOST_AUTO_TEST_CASE (ThroughPointsDirectionFollowsOnArcPoint) | |
| BOOST_AUTO_TEST_CASE (ThroughPointsMirroredOnArcPointMirrorsMid) | |
| BOOST_AUTO_TEST_CASE (ThroughPointsDegenerateIsInvalid) | |
| BOOST_AUTO_TEST_CASE (ThroughPointsVeryShallowArc) | |
| BOOST_AUTO_TEST_CASE (ThroughPointsOneNanometerSagitta) | |
| BOOST_AUTO_TEST_CASE (ThroughPointsNearIntegerLimits) | |
| BOOST_AUTO_TEST_CASE (OppositeCornersNearBillionUnits) | |
| BOOST_AUTO_TEST_CASE (MidDragProjectsOntoBisector) | |
| BOOST_AUTO_TEST_CASE (MidDragDiagonalChordIsEquidistant) | |
| BOOST_AUTO_TEST_CASE (MidDragOnChordIsInvalid) | |
| BOOST_AUTO_TEST_CASE (CenterDragMinorIsDefault) | |
| BOOST_AUTO_TEST_CASE (CenterDragMajorSweepsPastHalfTurn) | |
| BOOST_AUTO_TEST_CASE (CenterDragOnChordIsSemicircle) | |
| BOOST_AUTO_TEST_CASE (CenterDragDegenerateAndOverflowAreInvalid) | |
| BOOST_AUTO_TEST_CASE (TangentStartDirectionIsParallelOverEndSweep) | |
| BOOST_AUTO_TEST_CASE (TangentSweepIsTwiceTheChordAngle) | |
| BOOST_AUTO_TEST_CASE (TangentSideFollowsEndSide) | |
| BOOST_AUTO_TEST_CASE (TangentDegenerateIsInvalid) | |
| BOOST_AUTO_TEST_CASE | ( | CenterDragDegenerateAndOverflowAreInvalid | ) |
Definition at line 328 of file test_arc_construction.cpp.
References KIGEOM::ArcFromStartEndCenterDrag(), and KIGEOM::ARC_SOLUTION::valid.
| BOOST_AUTO_TEST_CASE | ( | CenterDragMajorSweepsPastHalfTurn | ) |
Definition at line 289 of file test_arc_construction.cpp.
References KIGEOM::ArcFromStartEndCenterDrag(), end, KIGEOM::ARC_SOLUTION::mid, and VECTOR2< T >::y.
| BOOST_AUTO_TEST_CASE | ( | CenterDragMinorIsDefault | ) |
Definition at line 275 of file test_arc_construction.cpp.
References KIGEOM::ArcFromStartEndCenterDrag(), KIGEOM::ARC_SOLUTION::center, end, and KIGEOM::ARC_SOLUTION::mid.
| BOOST_AUTO_TEST_CASE | ( | CenterDragOnChordIsSemicircle | ) |
Definition at line 309 of file test_arc_construction.cpp.
References std::abs(), KIGEOM::ArcFromStartEndCenterDrag(), BOOST_CHECK_EQUAL(), end, KIGEOM::ARC_SOLUTION::mid, VECTOR2< T >::x, and VECTOR2< T >::y.
| BOOST_AUTO_TEST_CASE | ( | MidDragDiagonalChordIsEquidistant | ) |
Definition at line 256 of file test_arc_construction.cpp.
References KIGEOM::ArcFromStartEndMidDrag(), and end.
| BOOST_AUTO_TEST_CASE | ( | MidDragOnChordIsInvalid | ) |
Definition at line 267 of file test_arc_construction.cpp.
References KIGEOM::ArcFromStartEndMidDrag(), and KIGEOM::ARC_SOLUTION::valid.
| BOOST_AUTO_TEST_CASE | ( | MidDragProjectsOntoBisector | ) |
Definition at line 237 of file test_arc_construction.cpp.
References KIGEOM::ArcFromStartEndMidDrag(), BOOST_CHECK_EQUAL(), end, KIGEOM::ARC_SOLUTION::mid, and KIGEOM::ARC_SOLUTION::radius.
| BOOST_AUTO_TEST_CASE | ( | OppositeCornersNearBillionUnits | ) |
Definition at line 211 of file test_arc_construction.cpp.
References std::abs(), KIGEOM::ArcFromStartEndCenterDrag(), KIGEOM::ArcFromStartEndMidDrag(), KIGEOM::ArcFromStartTangentEnd(), KIGEOM::ArcThroughPoints(), center, KIGEOM::ARC_SOLUTION::center, KIGEOM::ProjectToChordBisector(), VECTOR2< T >::x, and VECTOR2< T >::y.
| BOOST_AUTO_TEST_CASE | ( | ProjectLandsOnBisector | ) |
Definition at line 77 of file test_arc_construction.cpp.
References BOOST_AUTO_TEST_CASE(), BOOST_CHECK_EQUAL(), end, and KIGEOM::ProjectToChordBisector().
| BOOST_AUTO_TEST_CASE | ( | TangentDegenerateIsInvalid | ) |
Definition at line 399 of file test_arc_construction.cpp.
References KIGEOM::ArcFromStartTangentEnd(), and KIGEOM::ARC_SOLUTION::valid.
| BOOST_AUTO_TEST_CASE | ( | TangentSideFollowsEndSide | ) |
Definition at line 385 of file test_arc_construction.cpp.
References KIGEOM::ArcFromStartTangentEnd(), BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), left, and right.
| BOOST_AUTO_TEST_CASE | ( | TangentStartDirectionIsParallelOverEndSweep | ) |
Definition at line 338 of file test_arc_construction.cpp.
References KIGEOM::ArcFromStartTangentEnd(), BOOST_TEST_CONTEXT(), KIGEOM::ARC_SOLUTION::center, VECTOR2< T >::Dot(), end, KiROUND(), M_PI, KIGEOM::ARC_SOLUTION::radius, radius, VECTOR2< T >::x, and VECTOR2< T >::y.
| BOOST_AUTO_TEST_CASE | ( | TangentSweepIsTwiceTheChordAngle | ) |
Definition at line 373 of file test_arc_construction.cpp.
References KIGEOM::ArcFromStartTangentEnd().
| BOOST_AUTO_TEST_CASE | ( | ThroughPointsDegenerateIsInvalid | ) |
Definition at line 160 of file test_arc_construction.cpp.
References KIGEOM::ArcThroughPoints(), and KIGEOM::ARC_SOLUTION::valid.
| BOOST_AUTO_TEST_CASE | ( | ThroughPointsDirectionFollowsOnArcPoint | ) |
Definition at line 122 of file test_arc_construction.cpp.
References KIGEOM::ArcThroughPoints(), BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), KIGEOM::ARC_SOLUTION::center, KIGEOM::ARC_SOLUTION::end, KIGEOM::ARC_SOLUTION::mid, KIGEOM::ARC_SOLUTION::start, and KIGEOM::ARC_SOLUTION::valid.
| BOOST_AUTO_TEST_CASE | ( | ThroughPointsMajorArcMidIsHalfway | ) |
Definition at line 108 of file test_arc_construction.cpp.
References KIGEOM::ArcThroughPoints(), end, and KIGEOM::ARC_SOLUTION::mid.
| BOOST_AUTO_TEST_CASE | ( | ThroughPointsMirroredOnArcPointMirrorsMid | ) |
Definition at line 143 of file test_arc_construction.cpp.
References KIGEOM::ArcThroughPoints(), BOOST_CHECK_EQUAL(), down, end, and up.
| BOOST_AUTO_TEST_CASE | ( | ThroughPointsNearIntegerLimits | ) |
Definition at line 198 of file test_arc_construction.cpp.
References KIGEOM::ArcThroughPoints(), BOOST_CHECK_EQUAL(), end, KIGEOM::ARC_SOLUTION::mid, and KIGEOM::ARC_SOLUTION::radius.
| BOOST_AUTO_TEST_CASE | ( | ThroughPointsOneNanometerSagitta | ) |
Definition at line 184 of file test_arc_construction.cpp.
References KIGEOM::ArcThroughPoints(), BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), end, KIGEOM::ARC_SOLUTION::mid, KIGEOM::ARC_SOLUTION::radius, and KIGEOM::ARC_SOLUTION::valid.
| BOOST_AUTO_TEST_CASE | ( | ThroughPointsQuarterCircle | ) |
Definition at line 92 of file test_arc_construction.cpp.
References KIGEOM::ArcThroughPoints(), KIGEOM::ARC_SOLUTION::center, end, KIGEOM::ARC_SOLUTION::mid, KIGEOM::ARC_SOLUTION::radius, VECTOR2< T >::x, and VECTOR2< T >::y.
| BOOST_AUTO_TEST_CASE | ( | ThroughPointsVeryShallowArc | ) |
Definition at line 170 of file test_arc_construction.cpp.
References KIGEOM::ArcThroughPoints(), BOOST_CHECK_EQUAL(), end, KIGEOM::ARC_SOLUTION::mid, and KIGEOM::ARC_SOLUTION::radius.