64 if(
group->m_Uuid == aUuid )
83 std::unique_ptr<BOARD> board = std::make_unique<BOARD>();
84 board->SetProject( &settingsManager.
Prj() );
87 BOOST_REQUIRE_EQUAL( fpid.
Parse( wxS(
"TestLib:R" ) ), -1 );
89 addFootprint( board.get(), wxS(
"R1" ), fpid );
90 addFootprint( board.get(), wxS(
"R2" ), fpid );
91 addFootprint( board.get(), wxS(
"X3" ), fpid );
92 addFootprint( board.get(), wxS(
"X4" ), fpid );
93 addFootprint( board.get(), wxS(
"X5" ), fpid );
97 KIID r1 = addComponent(
netlist, wxS(
"R1" ), fpid );
98 KIID r2 = addComponent(
netlist, wxS(
"R2" ), fpid );
99 KIID x3 = addComponent(
netlist, wxS(
"X3" ), fpid );
100 KIID x4 = addComponent(
netlist, wxS(
"X4" ), fpid );
101 KIID x5 = addComponent(
netlist, wxS(
"X5" ), fpid );
110 new NETLIST_GROUP{ wxS(
"RPI1" ), parentUuid,
LIB_ID(), std::vector<KIID>{ x3, x4, x5, childUuid } } );
112 netlist.ApplyGroupMembership();
115 toolMgr.
SetEnvironment( board.get(),
nullptr,
nullptr,
nullptr,
nullptr );
125 PCB_GROUP* parentGroup = findGroup( board.get(), parentUuid );
126 PCB_GROUP* childGroup = findGroup( board.get(), childUuid );
128 BOOST_REQUIRE_MESSAGE( parentGroup,
"parent group RPI1 was not created on the board" );
129 BOOST_REQUIRE_MESSAGE( childGroup,
"child group RPI was not created on the board" );
132 "child group RPI is not nested inside parent group RPI1 "
133 "(nested group membership was lost on update)" );
136 "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 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()
BOOST_CHECK_MESSAGE(totalMismatches==0, std::to_string(totalMismatches)+" board(s) with strategy disagreements")