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 } ) );
108 BOOST_REQUIRE_EQUAL( m_board->Footprints().size(), 1 );
110 FOOTPRINT* survivor = m_board->Footprints().front();
111 BOOST_CHECK( survivor == fp );
112 BOOST_CHECK( survivor->
GetFPID() ==
makeFpid( wxS(
"TestLib:R_0603" ) ) );
115 BOOST_CHECK( survivor->
GetPath() == pathOf( kiid ) );
124 FOOTPRINT* fp = addBoardFootprint( wxS(
"R1" ), wxS(
"TestLib:R_0603" ) );
129 std::vector<KIID>{ kiid } ) );
141 BOOST_REQUIRE_EQUAL( m_board->Footprints().size(), 1 );
142 BOOST_CHECK( m_board->Footprints().front() == fp );
143 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.
void SetWillDrag(bool aWillDrag)
int GetNewFootprintCount() const
void SetIsDryRun(bool aEnabled)
Enable dry run mode (just report, no changes to PCB).
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)