77 auto oldBoard = std::make_unique<INSTRUMENTED_BOARD>( &dtorCount );
79 BOARD* oldBoardRaw = oldBoard.get();
81 std::vector<std::unique_ptr<FOOTPRINT_EDITOR_TAB_CONTEXT>> contexts;
82 contexts.push_back( std::make_unique<FOOTPRINT_EDITOR_TAB_CONTEXT>( wxS(
"Lib" ), wxS(
"A" ),
83 std::move( oldBoard ) ) );
85 auto newCtx = std::make_unique<FOOTPRINT_EDITOR_TAB_CONTEXT>(
86 wxS(
"Lib" ), wxS(
"B" ),
makeFpHolder( wxS(
"Lib" ), wxS(
"B" ) ) );
89 int dtorCountDuringInstall = -1;
90 BOARD* protectedBoardDuringInstall =
nullptr;
93 contexts, 0, std::move( newCtx ),
96 dtorCountDuringInstall = dtorCount;
97 protectedBoardDuringInstall = aDisplaced.
GetBoard();
106 BOOST_REQUIRE_EQUAL( contexts.size(), 1u );
119 auto outgoing = std::make_unique<INSTRUMENTED_BOARD>( &dtorCount );
124 auto fp = std::make_unique<FOOTPRINT>( outgoing.get() );
125 fp->SetFPID(
LIB_ID( wxS(
"Lib" ), wxS(
"Untitled" ) ) );
129 BOOST_CHECK( fp->GetBoard() ==
nullptr );
132 BOOST_REQUIRE_EQUAL( dtorCount, 1 );
134 std::unique_ptr<FOOTPRINT> clone(
static_cast<FOOTPRINT*
>( fp->Clone() ) );
136 BOOST_CHECK( clone->GetBoard() ==
nullptr );
BOOST_CHECK_EQUAL(result, "25.4")