KiCad PCB EDA Suite
|
#include <qa_utils/wx_utils/unit_test_utils.h>
#include <boost/test/data/test_case.hpp>
#include <geometry/seg.h>
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 | |
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_DATA_TEST_CASE (SegSegPerpendicular, boost::unit_test::data::make(seg_vec_perpendicular_cases), c) | |
BOOST_DATA_TEST_CASE (SegCreateParallel, boost::unit_test::data::make(segment_and_point_cases), c) | |
BOOST_DATA_TEST_CASE (SegCreatePerpendicular, boost::unit_test::data::make(segment_and_point_cases), c) | |
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 230 of file test_segment.cpp.
References SEG::A, SEG::B, and BOOST_CHECK_EQUAL().
BOOST_AUTO_TEST_CASE | ( | LineDistance | ) |
Definition at line 672 of file test_segment.cpp.
References BOOST_TEST().
BOOST_AUTO_TEST_CASE | ( | LineDistanceSided | ) |
Definition at line 680 of file test_segment.cpp.
References BOOST_TEST().
BOOST_DATA_TEST_CASE | ( | SegCreateParallel | , |
boost::unit_test::data::make(segment_and_point_cases) | , | ||
c | |||
) |
Definition at line 654 of file test_segment.cpp.
References BOOST_CHECK_PREDICATE(), and SEG::ParallelSeg().
BOOST_DATA_TEST_CASE | ( | SegCreatePerpendicular | , |
boost::unit_test::data::make(segment_and_point_cases) | , | ||
c | |||
) |
Definition at line 663 of file test_segment.cpp.
References BOOST_CHECK_PREDICATE(), and SEG::PerpendicularSeg().
BOOST_DATA_TEST_CASE | ( | SegSegPerpendicular | , |
boost::unit_test::data::make(seg_vec_perpendicular_cases) | , | ||
c | |||
) |
Definition at line 598 of file test_segment.cpp.
References BOOST_CHECK_PREDICATE().
|
static |
Definition at line 388 of file test_segment.cpp.
|
static |
Definition at line 259 of file test_segment.cpp.
|
static |
Test cases for collinearity.
Definition at line 449 of file test_segment.cpp.
|
static |
Definition at line 315 of file test_segment.cpp.
|
static |
Test cases for parallelism.
Definition at line 494 of file test_segment.cpp.
|
static |
Test cases for perpendicularity.
Definition at line 539 of file test_segment.cpp.
|
static |
Test cases to create segments passing through a point.
Definition at line 619 of file test_segment.cpp.