42 BOOST_REQUIRE_EQUAL(
id.
Parse( aFull ), -1 );
49 path.push_back( aUuid );
57 m_settingsManager.LoadProject(
"" );
58 m_board = std::make_unique<BOARD>();
59 m_board->SetProject( &m_settingsManager.Prj() );
61 m_toolMgr.SetEnvironment( m_board.get(),
nullptr,
nullptr,
nullptr,
nullptr );
62 m_toolMgr.RegisterTool(
new KI_TEST::DUMMY_TOOL() );
65 FOOTPRINT* addBoardFootprint(
const wxString& aRef,
const wxString& aFpid )
74 SETTINGS_MANAGER m_settingsManager;
75 std::unique_ptr<BOARD> m_board;
76 TOOL_MANAGER m_toolMgr;
90 FOOTPRINT* fp = addBoardFootprint( wxS(
"R1" ), wxS(
"TestLib:R_0603" ) );
95 std::vector<KIID>{ kiid } ) );
106 BOOST_REQUIRE_EQUAL( m_board->Footprints().size(), 1 );
108 FOOTPRINT* survivor = m_board->Footprints().front();
109 BOOST_CHECK( survivor == fp );
110 BOOST_CHECK( survivor->
GetFPID() ==
makeFpid( wxS(
"TestLib:R_0603" ) ) );
113 BOOST_CHECK( survivor->
GetPath() == pathOf( kiid ) );
122 FOOTPRINT* fp = addBoardFootprint( wxS(
"R1" ), wxS(
"TestLib:R_0603" ) );
127 std::vector<KIID>{ kiid } ) );
138 BOOST_REQUIRE_EQUAL( m_board->Footprints().size(), 1 );
139 BOOST_CHECK( m_board->Footprints().front() == fp );
140 BOOST_CHECK( m_board->Footprints().front()->GetFPID() ==
makeFpid( wxS(
"TestLib:R_0603" ) ) );
Update the BOARD with a new netlist.
bool UpdateNetlist(NETLIST &aNetlist)
Update the board's components according to the new netlist.
int GetNewFootprintCount() const
void SetDeleteUnusedFootprints(bool aEnabled)
int GetErrorCount() const
void SetReplaceFootprints(bool aEnabled)
void SetLookupByTimestamp(bool aEnabled)
A logical library item identifier and consists of various portions much like a URI.
Store information read from a netlist along with the flags used to update the NETLIST in the BOARD.
PARSE_RESULT Parse(const std::string &aString, NOTATION aNotation=NOTATION::SI, SIM_VALUE::TYPE aValueType=SIM_VALUE::TYPE_FLOAT)
BOOST_FIXTURE_TEST_CASE(ServerStartsAndResponds, API_SERVER_E2E_FIXTURE)
BOOST_FIXTURE_TEST_CASE(RelinkKeepsFootprintOnFpidChange, UPDATER_FIXTURE)
BOOST_AUTO_TEST_SUITE(CadstarPartParser)
BOOST_REQUIRE(intersection.has_value()==c.ExpectedIntersection.has_value())
BOOST_AUTO_TEST_SUITE_END()
BOOST_CHECK_EQUAL(result, "25.4")
static LIB_ID makeFpid(const wxString &aLibrary, const wxString &aItem)