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. More... | |
bool | SegDistanceCorrect (const SEG &aSegA, const SEG &aSegB, int aExp) |
Predicate to check expected distance between two segments. More... | |
bool | SegVecDistanceCorrect (const SEG &aSeg, const VECTOR2I &aVec, int aExp) |
Predicate to check expected distance between a segment and a point. More... | |
bool | SegCollinearCorrect (const SEG &aSegA, const SEG &aSegB, bool aExp) |
Predicate to check expected collision between two segments. More... | |
bool | SegParallelCorrect (const SEG &aSegA, const SEG &aSegB, bool aExp) |
Predicate to check expected parallelism between two segments. More... | |
bool | SegPerpendicularCorrect (const SEG &aSegA, const SEG &aSegB, bool aExp) |
Predicate to check expected perpendicularity between two segments. More... | |
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. More... | |
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) | |
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. More... | |
static const std::vector< SEG_SEG_BOOLEAN_CASE > | seg_vec_parallel_cases |
Test cases for parallelism. More... | |
static const std::vector< SEG_SEG_BOOLEAN_CASE > | seg_vec_perpendicular_cases |
Test cases for perpendicularity. More... | |
static const std::vector< SEG_VEC_CASE > | segment_and_point_cases |
Test cases to create segments passing through a point. More... | |
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 221 of file test_segment.cpp.
BOOST_AUTO_TEST_CASE | ( | SegCreateParallel | ) |
Definition at line 670 of file test_segment.cpp.
References BOOST_TEST_CONTEXT, SEG::ParallelSeg(), segment_and_point_cases, SegParallelCorrect(), and SegVecDistanceCorrect().
BOOST_AUTO_TEST_CASE | ( | SegCreatePerpendicular | ) |
Definition at line 684 of file test_segment.cpp.
References BOOST_TEST_CONTEXT, SEG::PerpendicularSeg(), segment_and_point_cases, SegPerpendicularCorrect(), and SegVecDistanceCorrect().
BOOST_AUTO_TEST_CASE | ( | SegSegCollinear | ) |
Definition at line 479 of file test_segment.cpp.
References BOOST_TEST_CONTEXT, seg_vec_collinear_cases, and SegCollinearCorrect().
BOOST_AUTO_TEST_CASE | ( | SegSegCollision | ) |
Definition at line 416 of file test_segment.cpp.
References BOOST_TEST_CONTEXT, seg_seg_coll_cases, and SegCollideCorrect().
BOOST_AUTO_TEST_CASE | ( | SegSegDistance | ) |
Definition at line 292 of file test_segment.cpp.
References BOOST_TEST_CONTEXT, seg_seg_dist_cases, and SegDistanceCorrect().
BOOST_AUTO_TEST_CASE | ( | SegSegParallel | ) |
Definition at line 531 of file test_segment.cpp.
References BOOST_TEST_CONTEXT, seg_vec_parallel_cases, and SegParallelCorrect().
BOOST_AUTO_TEST_CASE | ( | SegSegPerpendicular | ) |
Definition at line 607 of file test_segment.cpp.
References BOOST_TEST_CONTEXT, seg_vec_perpendicular_cases, and SegPerpendicularCorrect().
BOOST_AUTO_TEST_CASE | ( | SegVecDistance | ) |
Definition at line 349 of file test_segment.cpp.
References BOOST_TEST_CONTEXT, 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 BOOST_TEST_INFO, and SEG::Collide().
Referenced by BOOST_AUTO_TEST_CASE(), and SegDistanceCorrect().
Predicate to check expected collision between two segments.
Definition at line 127 of file test_segment.cpp.
References BOOST_TEST_INFO, and 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 BOOST_TEST_INFO, 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 159 of file test_segment.cpp.
References SEG::ApproxParallel(), and BOOST_TEST_INFO.
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 191 of file test_segment.cpp.
References SEG::ApproxPerpendicular(), and BOOST_TEST_INFO.
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 BOOST_TEST_INFO, and SEG::Distance().
Referenced by BOOST_AUTO_TEST_CASE().
|
static |
Definition at line 376 of file test_segment.cpp.
Referenced by BOOST_AUTO_TEST_CASE().
|
static |
Definition at line 251 of file test_segment.cpp.
Referenced by BOOST_AUTO_TEST_CASE().
|
static |
Test cases for collinearity.
Definition at line 444 of file test_segment.cpp.
Referenced by BOOST_AUTO_TEST_CASE().
|
static |
Definition at line 314 of file test_segment.cpp.
Referenced by BOOST_AUTO_TEST_CASE().
|
static |
Test cases for parallelism.
Definition at line 496 of file test_segment.cpp.
Referenced by BOOST_AUTO_TEST_CASE().
|
static |
Test cases for perpendicularity.
Definition at line 548 of file test_segment.cpp.
Referenced by BOOST_AUTO_TEST_CASE().
|
static |
Test cases to create segments passing through a point.
Definition at line 635 of file test_segment.cpp.
Referenced by BOOST_AUTO_TEST_CASE().