41static std::vector<wxString>
ToVector(
const std::initializer_list<const char*>& init )
43 std::vector<wxString> out;
44 for(
const char* s : init )
45 out.emplace_back( wxString::FromUTF8( s ) );
56 SCH_SHEET_LIST sheets = m_schematic->BuildSheetListSortedByPageNumbers();
58 SCH_SCREEN* screen = sheets.at( 0 ).LastScreen();
72 BOOST_REQUIRE_MESSAGE( resistor,
"Resistor symbol not found in test schematic" );
75 std::vector<SCH_PIN*> rpins = resistor->
GetPins( &sheets.at( 0 ) );
76 BOOST_REQUIRE_EQUAL( rpins.size(), 2 );
79 std::sort( rpins.begin(), rpins.end(), [](
SCH_PIN* a,
SCH_PIN* b ) {
80 return a->GetLocalPosition().y < b->GetLocalPosition().y;
84 bool validTop =
false;
85 std::vector<wxString>
top = rpins[0]->GetStackedPinNumbers( &validTop );
86 BOOST_CHECK( validTop );
87 std::vector<wxString> expectedTop =
ToVector( {
"1",
"2",
"3",
"4",
"5" } );
91 bool validBot =
false;
92 std::vector<wxString> bot = rpins[1]->GetStackedPinNumbers( &validBot );
93 BOOST_CHECK( validBot );
94 std::vector<wxString> expectedBot =
ToVector( {
"6",
"7",
"9",
"10",
"11" } );
98 size_t total =
top.size() + bot.size();
EE_TYPE OfType(KICAD_T aType) const
Instantiate the current locale within a scope in which you are expecting exceptions to be thrown.
Base class for any item which can be embedded within the SCHEMATIC container class,...
EE_RTREE & Items()
Get the full RTree, usually for iterating.
A container for handling SCH_SHEET_PATH objects in a flattened hierarchy.
wxString GetSchSymbolLibraryName() const
std::vector< const SCH_PIN * > GetPins(const SCH_SHEET_PATH *aSheet) const
Retrieve a list of the SCH_PINs for the given sheet path.
void LoadSchematic(SETTINGS_MANAGER &aSettingsManager, const wxString &aRelPath, std::unique_ptr< SCHEMATIC > &aSchematic)
std::vector< FAB_LAYER_COLOR > dummy
SETTINGS_MANAGER m_settingsManager
std::unique_ptr< SCHEMATIC > m_schematic
BOOST_CHECK_EQUAL_COLLECTIONS(mixed.begin(), mixed.end(), expMixed.begin(), expMixed.end())
BOOST_REQUIRE(intersection.has_value()==c.ExpectedIntersection.has_value())
KIBIS top(path, &reporter)
BOOST_FIXTURE_TEST_CASE(StackedPinNomenclature_ExpandsCorrectly, STACKED_PIN_FIXTURE)
static std::vector< wxString > ToVector(const std::initializer_list< const char * > &init)
BOOST_CHECK_EQUAL(result, "25.4")