64 if(
group->m_Uuid == aUuid )
75 path.push_back( aUuid );
91 std::unique_ptr<BOARD> board = std::make_unique<BOARD>();
92 board->SetProject( &settingsManager.
Prj() );
95 BOOST_REQUIRE_EQUAL( fpid.
Parse( wxS(
"TestLib:R" ) ), -1 );
105 KIID r1 = addComponent(
netlist, wxS(
"R1" ), fpid );
106 KIID r2 = addComponent(
netlist, wxS(
"R2" ), fpid );
107 KIID x3 = addComponent(
netlist, wxS(
"X3" ), fpid );
108 KIID x4 = addComponent(
netlist, wxS(
"X4" ), fpid );
109 KIID x5 = addComponent(
netlist, wxS(
"X5" ), fpid );
115 std::vector<KIID_PATH>{ pathOf( r1 ), pathOf( r2 ) } } );
119 wxS(
"RPI1" ), parentUuid,
LIB_ID(),
120 std::vector<KIID_PATH>{ pathOf( x3 ), pathOf( x4 ), pathOf( x5 ), pathOf( childUuid ) } } );
122 netlist.ApplyGroupMembership();
125 toolMgr.
SetEnvironment( board.get(),
nullptr,
nullptr,
nullptr,
nullptr );
137 PCB_GROUP* parentGroup = findGroup( board.get(), parentUuid );
138 PCB_GROUP* childGroup = findGroup( board.get(), childUuid );
140 BOOST_REQUIRE_MESSAGE( parentGroup,
"parent group RPI1 was not created on the board" );
141 BOOST_REQUIRE_MESSAGE( childGroup,
"child group RPI was not created on the board" );
144 "child group RPI is not nested inside parent group RPI1 "
145 "(nested group membership was lost on update)" );
147 BOOST_CHECK_MESSAGE( parentGroup->
GetItems().count( childGroup ) == 1,
148 "parent group RPI1 does not list child group RPI as a member" );
Update the BOARD with a new netlist.
bool UpdateNetlist(NETLIST &aNetlist)
Update the board's components according to the new netlist.
void SetWillDrag(bool aWillDrag)
void SetIsDryRun(bool aEnabled)
Enable dry run mode (just report, no changes to PCB).
void SetDeleteUnusedFootprints(bool aEnabled)
void SetReplaceFootprints(bool aEnabled)
void SetTransferGroups(bool aEnabled)
Information pertinent to a Pcbnew printed circuit board.
void Add(BOARD_ITEM *aItem, ADD_MODE aMode=ADD_MODE::INSERT, bool aSkipConnectivity=false) override
Removes an item from the container.
const GROUPS & Groups() const
The groups must maintain the following invariants.
A set of EDA_ITEMs (i.e., without duplicates).
std::unordered_set< EDA_ITEM * > & GetItems()
virtual EDA_GROUP * GetParentGroup() const
A logical library item identifier and consists of various portions much like a URI.
int Parse(const UTF8 &aId, bool aFix=false)
Parse LIB_ID with the information from aId.
Store information read from a netlist along with the flags used to update the NETLIST in the BOARD.
void AddComponent(COMPONENT *aComponent)
Add aComponent to the NETLIST.
A set of BOARD_ITEMs (i.e., without duplicates).
bool LoadProject(const wxString &aFullPath, bool aSetActive=true)
Load a project or sets up a new project with a specified path.
PROJECT & Prj() const
A helper while we are not MDI-capable – return the one and only project.
Class to handle a set of BOARD_ITEMs.
BOOST_AUTO_TEST_CASE(HorizontalAlignment)
BOOST_AUTO_TEST_SUITE(CadstarPartParser)
BOOST_REQUIRE(intersection.has_value()==c.ExpectedIntersection.has_value())
BOOST_AUTO_TEST_SUITE_END()
static FOOTPRINT * addFootprint(BOARD &aBoard, const wxString &aReference)