|
KiCad PCB EDA Suite
|
#include <qa_utils/wx_utils/unit_test_utils.h>#include <pcbnew_utils/board_test_utils.h>#include <board.h>#include <board_design_settings.h>#include <pad.h>#include <pcb_track.h>#include <pcb_text.h>#include <pcb_field.h>#include <footprint.h>#include <zone.h>#include <drc/drc_item.h>#include <settings/settings_manager.h>#include <tools/multichannel_tool.h>#include <connectivity/topo_match.h>#include <lib_id.h>#include <atomic>Go to the source code of this file.
Classes | |
| struct | MULTICHANNEL_TEST_FIXTURE |
| class | MOCK_TOOLS_HOLDER |
Functions | |
| RULE_AREA * | findRuleAreaByPartialName (MULTICHANNEL_TOOL *aTool, const wxString &aName) |
| RULE_AREA * | findRuleAreaByPlacementGroup (MULTICHANNEL_TOOL *aTool, const wxString &aGroupName) |
| int | countZonesByNameInRuleArea (BOARD *aBoard, const wxString &aZoneName, const RULE_AREA &aRuleArea) |
| BOOST_FIXTURE_TEST_CASE (MultichannelToolRegressions, MULTICHANNEL_TEST_FIXTURE) | |
| BOOST_FIXTURE_TEST_CASE (RepeatLayoutCopiesFootprintProperties, MULTICHANNEL_TEST_FIXTURE) | |
| Test that repeat layout copies footprint properties including field visibility, text positions, and 3D models (issue 22548). | |
| BOOST_FIXTURE_TEST_CASE (RepeatLayoutDoesNotRemoveReferenceVias, MULTICHANNEL_TEST_FIXTURE) | |
| Test that repeat layout does not remove vias from the reference area when a copper zone has the same name as one of the rule areas (issue 21184). | |
| BOOST_FIXTURE_TEST_CASE (RepeatLayoutRespectsZoneLayerSetsForOtherItems, MULTICHANNEL_TEST_FIXTURE) | |
| Test that "copy other items" only copies zones whose full layer sets are inside both source and target rule area layer sets (issue 22983). | |
| BOOST_FIXTURE_TEST_CASE (TopologyMatchDottedRefDes, MULTICHANNEL_TEST_FIXTURE) | |
| Test that topology matching works correctly with dotted reference designators used in multi-channel designs (issue 20058). | |
| BOOST_FIXTURE_TEST_CASE (GenerateRuleAreasIncludesChildSheets, MULTICHANNEL_TEST_FIXTURE) | |
| Test that GeneratePotentialRuleAreas includes components from child sheets when generating rule areas for a parent sheet (issue 20016). | |
| BOOST_FIXTURE_TEST_CASE (FindIsomorphismCancellation, MULTICHANNEL_TEST_FIXTURE) | |
| Test that FindIsomorphism respects cancellation and reports progress through the ISOMORPHISM_PARAMS interface. | |
| BOOST_FIXTURE_TEST_CASE | ( | FindIsomorphismCancellation | , |
| MULTICHANNEL_TEST_FIXTURE | ) |
Test that FindIsomorphism respects cancellation and reports progress through the ISOMORPHISM_PARAMS interface.
Definition at line 684 of file test_multichannel.cpp.
References MULTICHANNEL_TOOL::AutogenerateRuleAreas(), BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), BOOST_TEST_MESSAGE(), MULTICHANNEL_TOOL::FindExistingRuleAreas(), findRuleAreaByPartialName(), MULTICHANNEL_TOOL::GeneratePotentialRuleAreas(), MULTICHANNEL_TOOL::GetData(), KI_TEST::LoadBoard(), TMATCH::ISOMORPHISM_PARAMS::m_cancelled, RULE_AREA::m_components, RULE_AREA::m_generateEnabled, TMATCH::ISOMORPHISM_PARAMS::m_matchedComponents, RULE_AREAS_DATA::m_replaceExisting, RULE_AREA::m_sheetName, TMATCH::ISOMORPHISM_PARAMS::m_totalComponents, TOOL_MANAGER::RegisterTool(), result, and TOOL_MANAGER::SetEnvironment().
| BOOST_FIXTURE_TEST_CASE | ( | GenerateRuleAreasIncludesChildSheets | , |
| MULTICHANNEL_TEST_FIXTURE | ) |
Test that GeneratePotentialRuleAreas includes components from child sheets when generating rule areas for a parent sheet (issue 20016).
The vme-wren board has hierarchical sheets like /io_drivers_fp/bank0/ which contains child sheets /io_drivers_fp/bank0/io01/ through io78/. The parent sheet's rule area should include all components from child sheets.
Definition at line 620 of file test_multichannel.cpp.
References BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), BOOST_TEST_MESSAGE(), MULTICHANNEL_TOOL::GeneratePotentialRuleAreas(), MULTICHANNEL_TOOL::GetData(), KI_TEST::LoadBoard(), RULE_AREA::m_components, RULE_AREA::m_sheetPath, TOOL_MANAGER::RegisterTool(), and TOOL_MANAGER::SetEnvironment().
| BOOST_FIXTURE_TEST_CASE | ( | MultichannelToolRegressions | , |
| MULTICHANNEL_TEST_FIXTURE | ) |
Definition at line 102 of file test_multichannel.cpp.
References MULTICHANNEL_TOOL::AutogenerateRuleAreas(), BOOST_CHECK_EQUAL(), BOOST_TEST_MESSAGE(), MULTICHANNEL_TOOL::FindExistingRuleAreas(), findRuleAreaByPartialName(), MULTICHANNEL_TOOL::GeneratePotentialRuleAreas(), MULTICHANNEL_TOOL::GetData(), KI_TEST::LoadBoard(), RULE_AREA::m_components, RULE_AREA::m_generateEnabled, RULE_AREA::m_ruleName, RULE_AREA::m_sheetName, RULE_AREA::m_zone, TOOL_MANAGER::RegisterTool(), MULTICHANNEL_TOOL::RepeatLayout(), result, and TOOL_MANAGER::SetEnvironment().
| BOOST_FIXTURE_TEST_CASE | ( | RepeatLayoutCopiesFootprintProperties | , |
| MULTICHANNEL_TEST_FIXTURE | ) |
Test that repeat layout copies footprint properties including field visibility, text positions, and 3D models (issue 22548).
Definition at line 261 of file test_multichannel.cpp.
References BOOST_CHECK_EQUAL(), BOOST_TEST_MESSAGE(), MULTICHANNEL_TOOL::CheckRACompatibility(), MULTICHANNEL_TOOL::FindExistingRuleAreas(), MULTICHANNEL_TOOL::GetData(), FOOTPRINT::GetField(), FOOTPRINT::GetReference(), EDA_TEXT::IsVisible(), KI_TEST::LoadBoard(), RULE_AREA::m_components, RULE_AREA::m_ruleName, RULE_AREA::m_zone, FOOTPRINT::Models(), TOOL_MANAGER::RegisterTool(), MULTICHANNEL_TOOL::RepeatLayout(), result, TOOL_MANAGER::SetEnvironment(), and VALUE.
| BOOST_FIXTURE_TEST_CASE | ( | RepeatLayoutDoesNotRemoveReferenceVias | , |
| MULTICHANNEL_TEST_FIXTURE | ) |
Test that repeat layout does not remove vias from the reference area when a copper zone has the same name as one of the rule areas (issue 21184).
The bug occurred because enclosedByArea() matched zones by name, and when a copper fill zone shared a name with a rule area, items enclosed by either zone could be incorrectly affected.
Definition at line 373 of file test_multichannel.cpp.
References BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), BOOST_TEST_MESSAGE(), MULTICHANNEL_TOOL::CheckRACompatibility(), SHAPE_POLY_SET::Contains(), MULTICHANNEL_TOOL::FindExistingRuleAreas(), MULTICHANNEL_TOOL::GetData(), KI_TEST::LoadBoard(), RULE_AREA::m_ruleName, RULE_AREA::m_zone, ZONE::Outline(), PCB_VIA_T, TOOL_MANAGER::RegisterTool(), MULTICHANNEL_TOOL::RepeatLayout(), result, TOOL_MANAGER::SetEnvironment(), and via.
| BOOST_FIXTURE_TEST_CASE | ( | RepeatLayoutRespectsZoneLayerSetsForOtherItems | , |
| MULTICHANNEL_TEST_FIXTURE | ) |
Test that "copy other items" only copies zones whose full layer sets are inside both source and target rule area layer sets (issue 22983).
Definition at line 462 of file test_multichannel.cpp.
References BOOST_CHECK_EQUAL(), BOOST_REQUIRE(), countZonesByNameInRuleArea(), MULTICHANNEL_TOOL::FindExistingRuleAreas(), findRuleAreaByPlacementGroup(), KI_TEST::LoadBoard(), REPEAT_LAYOUT_OPTIONS::m_copyOtherItems, REPEAT_LAYOUT_OPTIONS::m_copyPlacement, REPEAT_LAYOUT_OPTIONS::m_copyRouting, REPEAT_LAYOUT_OPTIONS::m_includeLockedItems, TOOL_MANAGER::RegisterTool(), MULTICHANNEL_TOOL::RepeatLayout(), and TOOL_MANAGER::SetEnvironment().
| BOOST_FIXTURE_TEST_CASE | ( | TopologyMatchDottedRefDes | , |
| MULTICHANNEL_TEST_FIXTURE | ) |
Test that topology matching works correctly with dotted reference designators used in multi-channel designs (issue 20058).
Reference designators like TRIM_1.1 and TRIM_2.1 should be considered the same kind because they share the base prefix "TRIM_".
Definition at line 526 of file test_multichannel.cpp.
References FOOTPRINT::Add(), BOOST_CHECK_EQUAL(), BOOST_TEST_MESSAGE(), FOOTPRINT::Pads(), result, FOOTPRINT::SetFPID(), BOARD_CONNECTED_ITEM::SetNetCode(), PAD::SetNumber(), and FOOTPRINT::SetReference().
| int countZonesByNameInRuleArea | ( | BOARD * | aBoard, |
| const wxString & | aZoneName, | ||
| const RULE_AREA & | aRuleArea ) |
Definition at line 82 of file test_multichannel.cpp.
References SHAPE_POLY_SET::Contains(), RULE_AREA::m_zone, ZONE::Outline(), and BOARD::Zones().
Referenced by BOOST_FIXTURE_TEST_CASE().
| RULE_AREA * findRuleAreaByPartialName | ( | MULTICHANNEL_TOOL * | aTool, |
| const wxString & | aName ) |
Definition at line 60 of file test_multichannel.cpp.
References findRuleAreaByPartialName().
Referenced by BOOST_FIXTURE_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), and findRuleAreaByPartialName().
| RULE_AREA * findRuleAreaByPlacementGroup | ( | MULTICHANNEL_TOOL * | aTool, |
| const wxString & | aGroupName ) |
Definition at line 71 of file test_multichannel.cpp.
References MULTICHANNEL_TOOL::GetData(), and RULE_AREAS_DATA::m_areas.
Referenced by BOOST_FIXTURE_TEST_CASE().