|
KiCad PCB EDA Suite
|
#include <qa_utils/wx_utils/unit_test_utils.h>#include <algorithm>#include <board.h>#include <footprint.h>#include <pad.h>#include <pcb_field.h>#include <pcb_track.h>#include <drc/drc_item.h>#include <pcb_marker.h>#include <pcb_shape.h>#include <pcb_text.h>#include <pcb_table.h>#include <pcb_tablecell.h>#include <pcb_textbox.h>#include <pcb_dimension.h>#include <pcb_target.h>#include <pcb_group.h>#include <zone.h>#include <pcb_generator.h>#include <constraints/pcb_constraint.h>#include <constraints/board_constraint_adapter.h>#include <tools/block_drag_capability.h>Go to the source code of this file.
Functions | |
| BOOST_AUTO_TEST_CASE (RouterItemsInBoardEditor) | |
| BOOST_AUTO_TEST_CASE (FootprintHolderHasNoRouter) | |
| BOOST_AUTO_TEST_CASE (ShapeKindsSplitDeformableFromRigid) | |
| BOOST_AUTO_TEST_CASE (ConstrainedShapeIsDeformable) | |
| BOOST_AUTO_TEST_CASE (FootprintOwnedConstraintIsFound) | |
| BOOST_AUTO_TEST_CASE (FootprintChildShapeIsRigidInBoardEditor) | |
| BOOST_AUTO_TEST_CASE (FootprintChildrenAreDeformableInFootprintEditor) | |
| BOOST_AUTO_TEST_CASE (FootprintChildZoneIsRigidInBoardEditor) | |
| BOOST_AUTO_TEST_CASE (RigidOnlyTypes) | |
| BOOST_AUTO_TEST_CASE (GeneratorSafetyAllowList) | |
| BOOST_AUTO_TEST_CASE (GroupContainerMustBeExpanded) | |
| BOOST_AUTO_TEST_CASE (GroupExpansionFlattensAndDeduplicates) | |
| BOOST_AUTO_TEST_CASE (MarkerIsDroppedFromTheExpansion) | |
| BOOST_AUTO_TEST_CASE (FootprintChildIsDroppedWhenItsParentMovesToo) | |
| BOOST_AUTO_TEST_CASE (FootprintChildSurvivesWithoutItsParent) | |
| BOOST_AUTO_TEST_CASE (FootprintChildIsDroppedWhenTheParentArrivesThroughAGroup) | |
| BOOST_AUTO_TEST_CASE (GeneratorIsNotExpanded) | |
| BOOST_AUTO_TEST_CASE (ReferenceOnlyConstraintIsDeformable) | |
| BOOST_AUTO_TEST_CASE (MalformedConstraintIsDeformable) | |
| BOOST_AUTO_TEST_CASE (HeldEditNeighborFollows) | |
| BOOST_AUTO_TEST_CASE (NestedGroupSelectedTwiceExpandsOnce) | |
| BOOST_AUTO_TEST_CASE (UnsupportedGroupMemberSurvivesExpansion) | |
| BOOST_AUTO_TEST_CASE (ExpansionPreservesDirectItemOrder) | |
| BOOST_AUTO_TEST_CASE | ( | ConstrainedShapeIsDeformable | ) |
Definition at line 149 of file test_block_drag_capability.cpp.
References BOARD::Add(), PCB_CONSTRAINT::AddMember(), BlockDragCapability(), BlockDragIsConstraintMember(), BOOST_CHECK(), DEFORMABLE, HORIZONTAL, EDA_ITEM::m_Uuid, SEGMENT, and WHOLE.
| BOOST_AUTO_TEST_CASE | ( | ExpansionPreservesDirectItemOrder | ) |
Definition at line 572 of file test_block_drag_capability.cpp.
References BOARD::Add(), BlockDragExpandSelection(), BOOST_CHECK(), BOOST_REQUIRE_EQUAL(), group, and SEGMENT.
| BOOST_AUTO_TEST_CASE | ( | FootprintChildIsDroppedWhenItsParentMovesToo | ) |
Definition at line 352 of file test_block_drag_capability.cpp.
References BOARD::Add(), FOOTPRINT::Add(), BlockDragExpandSelection(), BOOST_CHECK_EQUAL(), BOOST_REQUIRE_EQUAL(), FOOTPRINT, PAD, pad, FOOTPRINT::Reference(), and SEGMENT.
| BOOST_AUTO_TEST_CASE | ( | FootprintChildIsDroppedWhenTheParentArrivesThroughAGroup | ) |
Definition at line 397 of file test_block_drag_capability.cpp.
References BOARD::Add(), BlockDragExpandSelection(), BOOST_CHECK(), BOOST_REQUIRE_EQUAL(), FOOTPRINT, group, and FOOTPRINT::Reference().
| BOOST_AUTO_TEST_CASE | ( | FootprintChildrenAreDeformableInFootprintEditor | ) |
Definition at line 204 of file test_block_drag_capability.cpp.
References BOARD::Add(), FOOTPRINT::Add(), BlockDragCapability(), BOOST_CHECK(), DEFORMABLE, FOOTPRINT, FPHOLDER, POLY, and BOARD::SetBoardUse().
| BOOST_AUTO_TEST_CASE | ( | FootprintChildShapeIsRigidInBoardEditor | ) |
Definition at line 190 of file test_block_drag_capability.cpp.
References BOARD::Add(), FOOTPRINT::Add(), BlockDragCapability(), BOOST_CHECK(), FOOTPRINT, RIGID, and SEGMENT.
| BOOST_AUTO_TEST_CASE | ( | FootprintChildSurvivesWithoutItsParent | ) |
Definition at line 376 of file test_block_drag_capability.cpp.
References BOARD::Add(), BlockDragExpandSelection(), BOOST_CHECK_EQUAL(), BOOST_REQUIRE_EQUAL(), FOOTPRINT, FOOTPRINT::Reference(), and SEGMENT.
| BOOST_AUTO_TEST_CASE | ( | FootprintChildZoneIsRigidInBoardEditor | ) |
Definition at line 222 of file test_block_drag_capability.cpp.
References BOARD::Add(), FOOTPRINT::Add(), BlockDragCapability(), BOOST_CHECK(), FOOTPRINT, and RIGID.
| BOOST_AUTO_TEST_CASE | ( | FootprintHolderHasNoRouter | ) |
Definition at line 103 of file test_block_drag_capability.cpp.
References BOARD::Add(), FOOTPRINT::Add(), BlockDragCapability(), BOOST_CHECK(), FOOTPRINT, FPHOLDER, PAD, pad, RIGID, BOARD::SetBoardUse(), and UNSUPPORTED.
| BOOST_AUTO_TEST_CASE | ( | FootprintOwnedConstraintIsFound | ) |
Definition at line 170 of file test_block_drag_capability.cpp.
References BOARD::Add(), FOOTPRINT::Add(), PCB_CONSTRAINT::AddMember(), BlockDragCapability(), BlockDragIsConstraintMember(), BOOST_CHECK(), DEFORMABLE, FOOTPRINT, FPHOLDER, EDA_ITEM::m_Uuid, SEGMENT, BOARD::SetBoardUse(), VERTICAL, and WHOLE.
| BOOST_AUTO_TEST_CASE | ( | GeneratorIsNotExpanded | ) |
Definition at line 415 of file test_block_drag_capability.cpp.
References BOARD::Add(), BlockDragExpandSelection(), BOOST_CHECK(), and BOOST_REQUIRE_EQUAL().
| BOOST_AUTO_TEST_CASE | ( | GeneratorSafetyAllowList | ) |
Definition at line 265 of file test_block_drag_capability.cpp.
References BOARD::Add(), BlockDragCapability(), BOOST_CHECK(), DEFORMABLE, RIGID, unknown, and UNSUPPORTED.
| BOOST_AUTO_TEST_CASE | ( | GroupContainerMustBeExpanded | ) |
Definition at line 286 of file test_block_drag_capability.cpp.
References BOARD::Add(), BlockDragCapability(), BOOST_CHECK(), group, and UNSUPPORTED.
| BOOST_AUTO_TEST_CASE | ( | GroupExpansionFlattensAndDeduplicates | ) |
Definition at line 297 of file test_block_drag_capability.cpp.
References BOARD::Add(), EDA_GROUP::AddItem(), BlockDragExpandSelection(), BOOST_CHECK(), BOOST_CHECK_EQUAL(), BOOST_REQUIRE_EQUAL(), PCB_GROUP_T, and SEGMENT.
| BOOST_AUTO_TEST_CASE | ( | HeldEditNeighborFollows | ) |
Definition at line 471 of file test_block_drag_capability.cpp.
References BOARD::Add(), PCB_CONSTRAINT::AddMember(), BOOST_CHECK(), BOOST_REQUIRE(), BOOST_REQUIRE_EQUAL(), COINCIDENT, END, EDA_SHAPE::GetStart(), EDA_ITEM::m_Uuid, moved, ReSolveShapeClustersHoldingEdited(), SEGMENT, PCB_SHAPE::SetEnd(), PCB_SHAPE::SetStart(), and START.
| BOOST_AUTO_TEST_CASE | ( | MalformedConstraintIsDeformable | ) |
Definition at line 451 of file test_block_drag_capability.cpp.
References BOARD::Add(), PCB_CONSTRAINT::AddMember(), BlockDragCapability(), BlockDragIsConstraintMember(), BOOST_CHECK(), DEFORMABLE, EDA_ITEM::m_Uuid, PARALLEL, SEGMENT, and WHOLE.
| BOOST_AUTO_TEST_CASE | ( | MarkerIsDroppedFromTheExpansion | ) |
Definition at line 333 of file test_block_drag_capability.cpp.
References BOARD::Add(), BlockDragExpandSelection(), BOOST_CHECK(), BOOST_REQUIRE_EQUAL(), DRC_ITEM::Create(), DRCE_CLEARANCE, and SEGMENT.
| BOOST_AUTO_TEST_CASE | ( | NestedGroupSelectedTwiceExpandsOnce | ) |
Definition at line 515 of file test_block_drag_capability.cpp.
References BOARD::Add(), EDA_GROUP::AddItem(), BlockDragExpandSelection(), BOOST_CHECK_EQUAL(), BOOST_REQUIRE_EQUAL(), and SEGMENT.
| BOOST_AUTO_TEST_CASE | ( | ReferenceOnlyConstraintIsDeformable | ) |
Definition at line 434 of file test_block_drag_capability.cpp.
References BOARD::Add(), PCB_CONSTRAINT::AddMember(), BlockDragCapability(), BlockDragIsConstraintMember(), BOOST_CHECK(), DEFORMABLE, HORIZONTAL, EDA_ITEM::m_Uuid, SEGMENT, PCB_CONSTRAINT::SetDriving(), and WHOLE.
| BOOST_AUTO_TEST_CASE | ( | RigidOnlyTypes | ) |
Definition at line 236 of file test_block_drag_capability.cpp.
References BOARD::Add(), BlockDragCapability(), BOOST_CHECK(), RIGID, table, text, and UNSUPPORTED.
| BOOST_AUTO_TEST_CASE | ( | RouterItemsInBoardEditor | ) |
Definition at line 79 of file test_block_drag_capability.cpp.
References BOARD::Add(), FOOTPRINT::Add(), BlockDragCapability(), BOOST_AUTO_TEST_CASE(), BOOST_CHECK(), FOOTPRINT, PAD, pad, ROUTER, and via.
| BOOST_AUTO_TEST_CASE | ( | ShapeKindsSplitDeformableFromRigid | ) |
Definition at line 122 of file test_block_drag_capability.cpp.
References BOARD::Add(), ARC, BEZIER, BlockDragCapability(), BOOST_CHECK(), CIRCLE, circle(), DEFORMABLE, ELLIPSE, ELLIPSE_ARC, POLY, rect(), RECTANGLE, RIGID, and SEGMENT.
| BOOST_AUTO_TEST_CASE | ( | UnsupportedGroupMemberSurvivesExpansion | ) |
Definition at line 547 of file test_block_drag_capability.cpp.
References BOARD::Add(), BlockDragCapability(), BlockDragExpandSelection(), BOOST_CHECK(), BOOST_CHECK_EQUAL(), BOOST_REQUIRE_EQUAL(), group, SEGMENT, unknown, and UNSUPPORTED.