|
KiCad PCB EDA Suite
|
#include <qa_utils/wx_utils/unit_test_utils.h>#include <qa_utils/geometry/geometry.h>#include <utility>#include <board.h>#include <board_commit.h>#include <core/kicad_algo.h>#include <core/mirror.h>#include <embedded_files.h>#include <geometry/shape_utils.h>#include <footprint.h>#include <mmh3_hash.h>#include <pad.h>#include <pcb_field.h>#include <pcb_shape.h>#include <pcbnew_utils/board_test_utils.h>#include <tool/tool_manager.h>Go to the source code of this file.
Functions | |
| static bool | CourtyardEqualPredicate (const SHAPE_POLY_SET &a, const SHAPE_POLY_SET &b) |
| BOOST_AUTO_TEST_CASE (FootprintCourtyardAndHull) | |
| BOOST_AUTO_TEST_CASE (FootprintCloneSharesEmbeddedFiles) | |
| BOOST_AUTO_TEST_CASE (FootprintBoundingBoxWithoutMandatoryFields) | |
| BOOST_AUTO_TEST_CASE (FootprintUpdateFieldsReusesMandatoryFields) | |
| BOOST_AUTO_TEST_CASE (FootprintUpdateFieldsInvalidatesGeometryCache) | |
| BOOST_AUTO_TEST_CASE (FootprintUpdateFieldsRestoresMissingMandatoryField) | |
| BOOST_AUTO_TEST_CASE (FootprintRotationKeepsPolygonArcs) | |
| BOOST_AUTO_TEST_CASE (ExchangeFootprintPadOverridesFollowResetOption) | |
| "Update/reset clearance overrides" covers a footprint's pads, not just the footprint. | |
| BOOST_AUTO_TEST_CASE | ( | ExchangeFootprintPadOverridesFollowResetOption | ) |
"Update/reset clearance overrides" covers a footprint's pads, not just the footprint.
Definition at line 423 of file test_footprint.cpp.
References BOARD::Add(), PADSTACK::ALL_LAYERS, BOOST_CHECK(), BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), BOOST_REQUIRE_EQUAL(), BOARD::BuildConnectivity(), BOARD::ExchangeFootprint(), FOOTPRINT, FULL, FOOTPRINT::GetFPID(), PAD::GetLocalClearance(), PAD::GetLocalZoneConnection(), INHERITED, PAD, pad, FOOTPRINT::Pads(), pcbIUScale, BOARD_COMMIT::Push(), RECTANGLE, TOOL_MANAGER::RegisterTool(), TOOL_MANAGER::SetEnvironment(), FOOTPRINT::SetFPID(), and TOP_BOTTOM.
| BOOST_AUTO_TEST_CASE | ( | FootprintBoundingBoxWithoutMandatoryFields | ) |
Definition at line 213 of file test_footprint.cpp.
References FOOTPRINT::Add(), BOOST_CHECK(), BOOST_REQUIRE(), F_Cu, FOOTPRINT::GetBoundingBox(), FOOTPRINT::GetField(), pcbIUScale, RECTANGLE, REFERENCE, FOOTPRINT::Remove(), FOOTPRINT::ResolveTextVar(), EDA_TEXT::SetVisible(), and VALUE.
| BOOST_AUTO_TEST_CASE | ( | FootprintCloneSharesEmbeddedFiles | ) |
Definition at line 166 of file test_footprint.cpp.
References MMH3_HASH::add(), EMBEDDED_FILES::AddFile(), BOOST_CHECK(), BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), FOOTPRINT::Clone(), EMBEDDED_FILES::CompressAndEncode(), MMH3_HASH::digest(), EMBEDDED_FILES::GetEmbeddedFile(), EMBEDDED_FILES::HasFile(), EMBEDDED_FILES::EMBEDDED_FILE::MODEL, EMBEDDED_FILES::OK, EMBEDDED_FILES::Seed(), and HASH_128::ToString().
| BOOST_AUTO_TEST_CASE | ( | FootprintCourtyardAndHull | ) |
Definition at line 59 of file test_footprint.cpp.
References FOOTPRINT::Add(), B_CrtYd, BOOST_AUTO_TEST_CASE(), BOOST_CHECK_PREDICATE(), BOOST_REQUIRE(), BOOST_TEST(), BOOST_TEST_CONTEXT(), BOX2< VECTOR2I >::ByCorners(), KI_TEST::ChainsAreCyclicallyEqual(), CourtyardEqualPredicate(), F_CrtYd, FOOTPRINT::Flip(), FOOTPRINT::GetBoundingHull(), FOOTPRINT::GetCourtyard(), LEFT_RIGHT, SHAPE_LINE_CHAIN::Mirror(), FOOTPRINT::Move(), SHAPE_LINE_CHAIN::Move(), SHAPE_POLY_SET::Outline(), SHAPE_POLY_SET::OutlineCount(), pcbIUScale, POLY, FOOTPRINT::Rotate(), and SHAPE_LINE_CHAIN::Rotate().
| BOOST_AUTO_TEST_CASE | ( | FootprintRotationKeepsPolygonArcs | ) |
Definition at line 389 of file test_footprint.cpp.
References FOOTPRINT::Add(), ANGLE_0, ANGLE_180, ANGLE_360, SHAPE_LINE_CHAIN::ArcCount(), BOOST_CHECK_EQUAL(), circle(), Cmts_User, FOOTPRINT::Flip(), PCB_SHAPE::GetLibraryPolyShape(), EDA_SHAPE::GetPolyShape(), FOOTPRINT::GetPosition(), LEFT_RIGHT, SHAPE_POLY_SET::Outline(), pcbIUScale, POLY, PCB_SHAPE::SetLayer(), FOOTPRINT::SetOrientation(), and PCB_SHAPE::SetPolyShape().
| BOOST_AUTO_TEST_CASE | ( | FootprintUpdateFieldsInvalidatesGeometryCache | ) |
Definition at line 325 of file test_footprint.cpp.
References BOARD::Add(), BOOST_CHECK(), BOOST_REQUIRE(), FOOTPRINT, FOOTPRINT::GetBoundingBox(), FOOTPRINT::GetField(), FOOTPRINT::GetFields(), pcbIUScale, EDA_TEXT::SetText(), FOOTPRINT::UpdateFields(), and VALUE.
| BOOST_AUTO_TEST_CASE | ( | FootprintUpdateFieldsRestoresMissingMandatoryField | ) |
Definition at line 360 of file test_footprint.cpp.
References BOOST_CHECK(), BOOST_REQUIRE(), BOOST_REQUIRE_EQUAL(), DATASHEET, DESCRIPTION, FOOTPRINT::GetField(), REFERENCE, FOOTPRINT::Remove(), FOOTPRINT::UpdateFields(), and VALUE.
| BOOST_AUTO_TEST_CASE | ( | FootprintUpdateFieldsReusesMandatoryFields | ) |
Definition at line 260 of file test_footprint.cpp.
References BOARD::Add(), FOOTPRINT::Add(), BOOST_CHECK(), BOOST_CHECK_EQUAL(), BOOST_REQUIRE_EQUAL(), alg::contains(), DATASHEET, DESCRIPTION, FOOTPRINT, FOOTPRINT::GetField(), FOOTPRINT::GetFields(), BOARD_ITEM::GetParent(), EDA_TEXT::GetText(), EDA_ITEM::m_Uuid, REFERENCE, BOARD::ResolveItem(), EDA_TEXT::SetText(), FOOTPRINT::UpdateFields(), USER, and VALUE.
|
static |
Definition at line 40 of file test_footprint.cpp.
References BOOST_REQUIRE(), KI_TEST::ChainsAreCyclicallyEqual(), SHAPE_POLY_SET::Outline(), SHAPE_POLY_SET::OutlineCount(), and pcbIUScale.
Referenced by BOOST_AUTO_TEST_CASE().