KiCad PCB EDA Suite
|
#include <qa_utils/wx_utils/unit_test_utils.h>
#include <geometry/circle.h>
#include <geometry/seg.h>
#include <geometry/shape.h>
Go to the source code of this file.
Classes | |
struct | CIR_PT_BOOL_CASE |
Struct to hold test cases for a given circle, a point and an expected return boolean. More... | |
struct | CIR_PT_PT_CASE |
Struct to hold test cases for a given circle, a point and an expected return point. More... | |
struct | CIR_CIR_VECPT_CASE |
Struct to hold test cases for two circles, and an vector of points. More... | |
struct | SEG_SEG_VECPT_CASE |
Struct to hold test cases for a circle, a line and an expected vector of points. More... | |
struct | CIR_SEG_VECPT_CASE |
Struct to hold test cases for two lines, a point and an expected returned circle. More... | |
Functions | |
bool | CompareLength (int aLengthA, int aLengthB) |
bool | CompareVector2I (const VECTOR2I &aVecA, const VECTOR2I &aVecB) |
BOOST_AUTO_TEST_CASE (ParameterCtorMod) | |
Checks whether the construction of a circle referencing external parameters works and that the parameters can be modified directly. | |
BOOST_AUTO_TEST_CASE (Contains) | |
BOOST_AUTO_TEST_CASE (NearestPoint) | |
BOOST_AUTO_TEST_CASE (IntersectCircle) | |
BOOST_AUTO_TEST_CASE (Intersect) | |
BOOST_AUTO_TEST_CASE (IntersectLine) | |
BOOST_AUTO_TEST_CASE (ConstructFromTanTanPt) | |
Variables | |
const int | MIN_PRECISION_45DEG = KiROUND( (double) SHAPE::MIN_PRECISION_IU * 0.7071 ) |
static const std::vector< CIR_PT_BOOL_CASE > | contains_cases |
Test cases for CIRCLE::Contains. | |
static const std::vector< CIR_PT_PT_CASE > | nearest_point_cases |
Test cases for CIRCLE::NearestPoint. | |
static const std::vector< CIR_CIR_VECPT_CASE > | intersect_circle_cases |
Test cases for #CIRCLE::Intersect( const CIRCLE& aCircle ) | |
static const std::vector< SEG_SEG_VECPT_CASE > | intersect_seg_cases |
Test cases for #CIRCLE::Intersect( const SEG& aSeg ) | |
static const std::vector< SEG_SEG_VECPT_CASE > | intersect_line_cases |
Test cases for #CIRCLE::IntersectLine( const SEG& aSeg ) | |
static const std::vector< CIR_SEG_VECPT_CASE > | construct_tan_tan_pt_cases |
Test cases for #CIRCLE::Intersect( const SEG& aSeg ) | |
BOOST_AUTO_TEST_CASE | ( | ConstructFromTanTanPt | ) |
Definition at line 578 of file test_circle.cpp.
References CIRCLE::Center, CompareLength(), CompareVector2I(), construct_tan_tan_pt_cases, CIRCLE::ConstructFromTanTanPt(), and CIRCLE::Radius.
BOOST_AUTO_TEST_CASE | ( | Contains | ) |
Definition at line 168 of file test_circle.cpp.
References contains_cases.
BOOST_AUTO_TEST_CASE | ( | Intersect | ) |
Definition at line 425 of file test_circle.cpp.
References KI_TEST::CheckUnorderedMatches(), CompareVector2I(), and intersect_seg_cases.
BOOST_AUTO_TEST_CASE | ( | IntersectCircle | ) |
Definition at line 341 of file test_circle.cpp.
References KI_TEST::CheckUnorderedMatches(), CompareVector2I(), and intersect_circle_cases.
BOOST_AUTO_TEST_CASE | ( | IntersectLine | ) |
Definition at line 491 of file test_circle.cpp.
References KI_TEST::CheckUnorderedMatches(), CompareVector2I(), and intersect_line_cases.
BOOST_AUTO_TEST_CASE | ( | NearestPoint | ) |
Definition at line 226 of file test_circle.cpp.
References nearest_point_cases.
BOOST_AUTO_TEST_CASE | ( | ParameterCtorMod | ) |
Checks whether the construction of a circle referencing external parameters works and that the parameters can be modified directly.
Definition at line 55 of file test_circle.cpp.
References CIRCLE::Center, and CIRCLE::Radius.
bool CompareLength | ( | int | aLengthA, |
int | aLengthB | ||
) |
Definition at line 28 of file test_circle.cpp.
References SHAPE::MIN_PRECISION_IU.
Referenced by BOOST_AUTO_TEST_CASE(), and CompareVector2I().
Definition at line 38 of file test_circle.cpp.
References CompareLength(), VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by BOOST_AUTO_TEST_CASE().
|
static |
Test cases for #CIRCLE::Intersect( const SEG& aSeg )
Definition at line 522 of file test_circle.cpp.
Referenced by BOOST_AUTO_TEST_CASE().
|
static |
Test cases for CIRCLE::Contains.
Definition at line 91 of file test_circle.cpp.
Referenced by BOOST_AUTO_TEST_CASE().
|
static |
Test cases for #CIRCLE::Intersect( const CIRCLE& aCircle )
Definition at line 254 of file test_circle.cpp.
Referenced by BOOST_AUTO_TEST_CASE().
|
static |
Test cases for #CIRCLE::IntersectLine( const SEG& aSeg )
Definition at line 443 of file test_circle.cpp.
Referenced by BOOST_AUTO_TEST_CASE().
|
static |
Test cases for #CIRCLE::Intersect( const SEG& aSeg )
Definition at line 378 of file test_circle.cpp.
Referenced by BOOST_AUTO_TEST_CASE().
const int MIN_PRECISION_45DEG = KiROUND( (double) SHAPE::MIN_PRECISION_IU * 0.7071 ) |
Definition at line 26 of file test_circle.cpp.
|
static |
Test cases for CIRCLE::NearestPoint.
Definition at line 197 of file test_circle.cpp.
Referenced by BOOST_AUTO_TEST_CASE().