KiCad PCB EDA Suite
|
Go to the source code of this file.
Classes | |
struct | SEG_SEG_DISTANCE_CASE |
struct | SEG_VECTOR_DISTANCE_CASE |
struct | SEG_SEG_COLLIDE_CASE |
Test cases for collisions (with clearance, for no clearance, it's just a SEG_SEG_DISTANCE_CASE of 0) More... | |
struct | SEG_SEG_BOOLEAN_CASE |
Struct to hold general cases for collinearity, parallelism and perpendicularity. More... | |
struct | SEG_VEC_CASE |
Struct to hold cases for operations with a SEG, and a VECTOR2I. More... | |
Functions | |
bool | SegCollideCorrect (const SEG &aSegA, const SEG &aSegB, int aClearance, bool aExp) |
Predicate to check expected collision between two segments. | |
bool | SegDistanceCorrect (const SEG &aSegA, const SEG &aSegB, int aExp) |
Predicate to check expected distance between two segments. | |
bool | SegVecDistanceCorrect (const SEG &aSeg, const VECTOR2I &aVec, int aExp) |
Predicate to check expected distance between a segment and a point. | |
bool | SegCollinearCorrect (const SEG &aSegA, const SEG &aSegB, bool aExp) |
Predicate to check expected collision between two segments. | |
bool | SegParallelCorrect (const SEG &aSegA, const SEG &aSegB, bool aExp) |
Predicate to check expected parallelism between two segments. | |
bool | SegPerpendicularCorrect (const SEG &aSegA, const SEG &aSegB, bool aExp) |
Predicate to check expected perpendicularity between two segments. | |
BOOST_AUTO_TEST_CASE (EndpointCtorMod) | |
Checks whether the construction of a segment referencing external points works and that the endpoints can be modified as normal points. | |
BOOST_AUTO_TEST_CASE (SegSegDistance) | |
BOOST_AUTO_TEST_CASE (SegVecDistance) | |
BOOST_AUTO_TEST_CASE (SegSegCollision) | |
BOOST_AUTO_TEST_CASE (SegSegCollinear) | |
BOOST_AUTO_TEST_CASE (SegSegParallel) | |
BOOST_AUTO_TEST_CASE (SegSegPerpendicular) | |
BOOST_AUTO_TEST_CASE (SegCreateParallel) | |
BOOST_AUTO_TEST_CASE (SegCreatePerpendicular) | |
BOOST_AUTO_TEST_CASE (LineDistance) | |
BOOST_AUTO_TEST_CASE (LineDistanceSided) | |
Variables | |
static const std::vector< SEG_SEG_DISTANCE_CASE > | seg_seg_dist_cases |
static const std::vector< SEG_VECTOR_DISTANCE_CASE > | seg_vec_dist_cases |
static const std::vector< SEG_SEG_COLLIDE_CASE > | seg_seg_coll_cases |
static const std::vector< SEG_SEG_BOOLEAN_CASE > | seg_vec_collinear_cases |
Test cases for collinearity. | |
static const std::vector< SEG_SEG_BOOLEAN_CASE > | seg_vec_parallel_cases |
Test cases for parallelism. | |
static const std::vector< SEG_SEG_BOOLEAN_CASE > | seg_vec_perpendicular_cases |
Test cases for perpendicularity. | |
static const std::vector< SEG_VEC_CASE > | segment_and_point_cases |
Test cases to create segments passing through a point. | |
BOOST_AUTO_TEST_CASE | ( | EndpointCtorMod | ) |
Checks whether the construction of a segment referencing external points works and that the endpoints can be modified as normal points.
Definition at line 224 of file test_segment.cpp.
BOOST_AUTO_TEST_CASE | ( | LineDistance | ) |
Definition at line 719 of file test_segment.cpp.
References BOOST_TEST().
BOOST_AUTO_TEST_CASE | ( | LineDistanceSided | ) |
Definition at line 727 of file test_segment.cpp.
References BOOST_TEST().
BOOST_AUTO_TEST_CASE | ( | SegCreateParallel | ) |
Definition at line 691 of file test_segment.cpp.
References SEG::ParallelSeg(), segment_and_point_cases, SegParallelCorrect(), and SegVecDistanceCorrect().
BOOST_AUTO_TEST_CASE | ( | SegCreatePerpendicular | ) |
Definition at line 705 of file test_segment.cpp.
References SEG::PerpendicularSeg(), segment_and_point_cases, SegPerpendicularCorrect(), and SegVecDistanceCorrect().
BOOST_AUTO_TEST_CASE | ( | SegSegCollinear | ) |
Definition at line 500 of file test_segment.cpp.
References seg_vec_collinear_cases, and SegCollinearCorrect().
BOOST_AUTO_TEST_CASE | ( | SegSegCollision | ) |
Definition at line 437 of file test_segment.cpp.
References seg_seg_coll_cases, and SegCollideCorrect().
BOOST_AUTO_TEST_CASE | ( | SegSegDistance | ) |
Definition at line 295 of file test_segment.cpp.
References seg_seg_dist_cases, and SegDistanceCorrect().
BOOST_AUTO_TEST_CASE | ( | SegSegParallel | ) |
Definition at line 552 of file test_segment.cpp.
References seg_vec_parallel_cases, and SegParallelCorrect().
BOOST_AUTO_TEST_CASE | ( | SegSegPerpendicular | ) |
Definition at line 628 of file test_segment.cpp.
References seg_vec_perpendicular_cases, and SegPerpendicularCorrect().
BOOST_AUTO_TEST_CASE | ( | SegVecDistance | ) |
Definition at line 370 of file test_segment.cpp.
References seg_vec_dist_cases, and SegVecDistanceCorrect().
Predicate to check expected collision between two segments.
aSegA | the first SEG |
aSegB | the second SEG |
aClearance | the collision clearance |
aExp | expected collision |
Definition at line 38 of file test_segment.cpp.
References SEG::Collide().
Referenced by BOOST_AUTO_TEST_CASE(), and SegDistanceCorrect().
Predicate to check expected collision between two segments.
Definition at line 130 of file test_segment.cpp.
References SEG::Collinear().
Referenced by BOOST_AUTO_TEST_CASE().
Predicate to check expected distance between two segments.
Definition at line 70 of file test_segment.cpp.
References SEG::Distance(), and SegCollideCorrect().
Referenced by BOOST_AUTO_TEST_CASE().
Predicate to check expected parallelism between two segments.
aSegA | the first SEG |
sSegB | the second SEG |
aExp | expected parallelism: true = segments are parallel false = segments are not parallel |
Definition at line 162 of file test_segment.cpp.
References SEG::ApproxParallel().
Referenced by BOOST_AUTO_TEST_CASE().
Predicate to check expected perpendicularity between two segments.
aSegA | the first SEG |
sSegB | the second SEG |
aExp | expected perpendicularity: true = segments are perpendicular false = segments are not perpendicular |
Definition at line 194 of file test_segment.cpp.
References SEG::ApproxPerpendicular().
Referenced by BOOST_AUTO_TEST_CASE().
Predicate to check expected distance between a segment and a point.
aSegA | the segment |
aVec | the vector (point) |
aExp | expected distance |
Definition at line 104 of file test_segment.cpp.
References SEG::Distance(), and SEG::SquaredDistance().
Referenced by BOOST_AUTO_TEST_CASE().
|
static |
Definition at line 397 of file test_segment.cpp.
Referenced by BOOST_AUTO_TEST_CASE().
|
static |
Definition at line 254 of file test_segment.cpp.
Referenced by BOOST_AUTO_TEST_CASE().
|
static |
Test cases for collinearity.
Definition at line 465 of file test_segment.cpp.
Referenced by BOOST_AUTO_TEST_CASE().
|
static |
Definition at line 317 of file test_segment.cpp.
Referenced by BOOST_AUTO_TEST_CASE().
|
static |
Test cases for parallelism.
Definition at line 517 of file test_segment.cpp.
Referenced by BOOST_AUTO_TEST_CASE().
|
static |
Test cases for perpendicularity.
Definition at line 569 of file test_segment.cpp.
Referenced by BOOST_AUTO_TEST_CASE().
|
static |
Test cases to create segments passing through a point.
Definition at line 656 of file test_segment.cpp.
Referenced by BOOST_AUTO_TEST_CASE().