KiCad PCB EDA Suite
|
#include <qa_utils/wx_utils/unit_test_utils.h>
#include <boost/test/data/test_case.hpp>
#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 | 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_CHECK_EQUAL (ret, c.m_exp_result) | |
BOOST_CHECK_EQUAL (c.m_exp_result.size(), ret.size()) | |
BOOST_DATA_TEST_CASE (ConstructFromTanTanPt, boost::unit_test::data::make(construct_tan_tan_pt_cases), c) | |
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 | ( | ParameterCtorMod | ) |
Checks whether the construction of a circle referencing external parameters works and that the parameters can be modified directly.
Definition at line 57 of file test_circle.cpp.
References BOOST_CHECK_EQUAL(), CIRCLE::Center, center, CIRCLE::Radius, and radius.
BOOST_CHECK_EQUAL | ( | c.m_exp_result. | size(), |
ret. | size() | ||
) |
BOOST_CHECK_EQUAL | ( | ret | , |
c. | m_exp_result | ||
) |
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_DATA_TEST_CASE(), BOOST_DATA_TEST_CASE_F(), BOOST_FIXTURE_TEST_CASE(), CHECK_COLLECTIONS_SAME_UNORDERED(), TEST_SCH_REFERENCE_LIST_FIXTURE::checkAnnotation(), CheckArrayTransforms(), KI_TEST::CheckFootprint(), KI_TEST::CheckFpPad(), KI_TEST::CheckFpShape(), KI_TEST::CheckFpText(), KI_TEST::CheckFpZone(), KI_TEST::CheckShapePolySet(), LEGACY_POWER_SYMBOLS_TEST_FIXTURE::CheckSymbols(), TEST_BOARD_ITEM_FIXTURE::CompareItems(), TEST_EE_ITEM_FIXTURE::CompareItems(), TEST_SIM_LIBRARY_SPICE_FIXTURE::CompareToEmptyModel(), TEST_SIM_LIBRARY_SPICE_FIXTURE::CompareToUsualDiodeModel(), createBoard(), DoDistributeGapsTestChecks(), DoDistributePointsTestChecks(), DoDogboneTestChecks(), KI_TEST::LoadAndTestBoardFile(), KI_TEST::LoadAndTestFootprintFile(), TestConcaveSquareFillet(), testEvalExpr(), testGroupEqual(), testGroupsEqual(), TestSquareFillet(), and TEST_SIM_LIBRARY_SPICE_FIXTURE::TestTransistor().
BOOST_DATA_TEST_CASE | ( | ConstructFromTanTanPt | , |
boost::unit_test::data::make(construct_tan_tan_pt_cases) | , | ||
c | |||
) |
Definition at line 547 of file test_circle.cpp.
References CIRCLE::Center, CompareLength(), CompareVector2I(), CIRCLE::ConstructFromTanTanPt(), and CIRCLE::Radius.
bool CompareLength | ( | int | aLengthA, |
int | aLengthB | ||
) |
Definition at line 30 of file test_circle.cpp.
References SHAPE::MIN_PRECISION_IU.
Referenced by BOOST_DATA_TEST_CASE(), and CompareVector2I().
Definition at line 40 of file test_circle.cpp.
References CompareLength(), VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by BOOST_DATA_TEST_CASE().
|
static |
Test cases for #CIRCLE::Intersect( const SEG& aSeg )
Definition at line 491 of file test_circle.cpp.
|
static |
Test cases for CIRCLE::Contains.
Definition at line 92 of file test_circle.cpp.
|
static |
Test cases for #CIRCLE::Intersect( const CIRCLE& aCircle )
Definition at line 240 of file test_circle.cpp.
|
static |
Test cases for #CIRCLE::IntersectLine( const SEG& aSeg )
Definition at line 419 of file test_circle.cpp.
|
static |
Test cases for #CIRCLE::Intersect( const SEG& aSeg )
Definition at line 360 of file test_circle.cpp.
const int MIN_PRECISION_45DEG = KiROUND( (double) SHAPE::MIN_PRECISION_IU * 0.7071 ) |
Definition at line 28 of file test_circle.cpp.
|
static |
Test cases for CIRCLE::NearestPoint.
Definition at line 190 of file test_circle.cpp.