73 const std::map<std::string, UTF8>& aProps )
95 BOOST_CHECK( m_plugin.CanReadSchematicFile( goodPath ) );
102 BOOST_CHECK( !m_plugin.CanReadSchematicFile( txtPath ) );
109 BOOST_CHECK( !m_plugin.CanReadSchematicFile( legacyPath ) );
112 BOOST_CHECK( !m_plugin.CanReadSchematicFile( randomPath ) );
122 SCH_SHEET* sheet = LoadGedaSchematic(
"/io/geda/minimal_test.sch" );
143 SCH_SHEET* sheet = LoadGedaSchematic(
"/io/geda/minimal_test.sch" );
149 bool foundR1 =
false;
150 bool foundC1 =
false;
160 if( ref == wxT(
"R1" ) )
166 if( ref == wxT(
"C1" ) )
180 SCH_SHEET* sheet = LoadGedaSchematic(
"/io/geda/minimal_test.sch" );
205 SCH_SHEET* sheet = LoadGedaSchematic(
"/io/geda/minimal_test.sch" );
212 bool foundInput =
false;
213 bool foundMid =
false;
214 bool foundGnd =
false;
223 if( label->
GetText() == wxT(
"INPUT" ) )
225 else if( label->
GetText() == wxT(
"MID" ) )
227 else if( label->
GetText() == wxT(
"GND" ) )
241 SCH_SHEET* sheet = LoadGedaSchematic(
"/io/geda/minimal_test.sch" );
247 int junctionCount = 0;
267 SCH_SHEET* sheet = LoadGedaSchematic(
"/io/geda/ayab/ayab_rs.sch" );
295 SCH_SHEET* sheet = LoadGedaSchematic(
"/io/geda/ayab/ayab_rs.sch" );
301 std::map<wxString, wxString> expectedValues = {
302 { wxT(
"U1" ), wxT(
"METROMINI" ) },
303 { wxT(
"U4" ), wxT(
"" ) },
304 { wxT(
"U2" ), wxT(
"" ) },
305 { wxT(
"R1" ), wxT(
"5k" ) },
306 { wxT(
"R2" ), wxT(
"62" ) },
307 { wxT(
"R3" ), wxT(
"320" ) },
308 { wxT(
"C1" ), wxT(
"1 uF" ) },
309 { wxT(
"C2" ), wxT(
"0.1 uF" ) },
310 { wxT(
"C3" ), wxT(
"22 uF 16V" ) },
311 { wxT(
"D1" ), wxT(
"" ) },
312 { wxT(
"L1" ), wxT(
"AT-1224-TWT-5V-2-R" ) },
313 { wxT(
"Q1" ), wxT(
"" ) },
314 { wxT(
"S1" ), wxT(
"" ) },
315 { wxT(
"RN1" ), wxT(
"1k" ) },
316 { wxT(
"J1" ), wxT(
"" ) },
319 std::set<wxString> foundRefs;
329 if( expectedValues.count( ref ) )
331 foundRefs.insert( ref );
332 wxString expectedVal = expectedValues[ref];
334 if( !expectedVal.IsEmpty() )
338 ref +
" value mismatch: expected '" + expectedVal +
"' got '"
344 for(
const auto& [ref, val] : expectedValues )
353 SCH_SHEET* sheet = LoadGedaSchematic(
"/io/geda/ayab/ayab_rs.sch" );
359 std::map<wxString, wxString> expectedFootprints = {
360 { wxT(
"U1" ), wxT(
"MetroMini" ) },
361 { wxT(
"R1" ), wxT(
"0805_reflow_solder_2" ) },
362 { wxT(
"C2" ), wxT(
"0603_reflow_solder" ) },
363 { wxT(
"D1" ), wxT(
"DO214AA_HSMB" ) },
364 { wxT(
"S1" ), wxT(
"TYCO_FSMJSM" ) },
365 { wxT(
"L1" ), wxT(
"buzzer.fp" ) },
366 { wxT(
"Q1" ), wxT(
"SOT23_3" ) },
367 { wxT(
"RN1" ), wxT(
"ResArray_1206x4_YC164" ) },
378 auto it = expectedFootprints.find( ref );
380 if( it != expectedFootprints.end() )
384 ref +
" footprint mismatch: expected '" + it->second +
"' got '"
393 SCH_SHEET* sheet = LoadGedaSchematic(
"/io/geda/ayab/ayab_rs.sch" );
401 std::map<wxString, int> expectedPinCounts = {
418 auto it = expectedPinCounts.find( ref );
420 if( it != expectedPinCounts.end() )
422 int pinCount =
static_cast<int>( sym->
GetLibPins().size() );
425 pinCount == it->second,
426 ref +
" pin count mismatch: expected " + std::to_string( it->second )
427 +
" got " + std::to_string( pinCount )
428 +
" (symbol may not have loaded from gschem-symbols/)" );
436 SCH_SHEET* sheet = LoadGedaSchematic(
"/io/geda/ayab/ayab_rs.sch" );
443 std::map<wxString, int> expectedPinCounts = {
457 auto it = expectedPinCounts.find( ref );
459 if( it != expectedPinCounts.end() )
461 int pinCount =
static_cast<int>( sym->
GetLibPins().size() );
464 pinCount == it->second,
465 ref +
" pin count mismatch: expected " + std::to_string( it->second )
466 +
" got " + std::to_string( pinCount )
467 +
" (stdlib stub may not have been found via gafrc)" );
478 SCH_SHEET* sheet = LoadGedaSchematic(
"/io/geda/priority_test/priority_test.sch" );
491 int pinCount =
static_cast<int>( sym->
GetLibPins().size() );
494 "Expected 3-pin local override, got " + std::to_string( pinCount )
495 +
" pins (project symbol should override system)" );
499 BOOST_FAIL(
"Symbol not found" );
505 SCH_SHEET* sheet = LoadGedaSchematic(
"/io/geda/ayab/ayab_rs.sch" );
514 std::set<wxString> expectedNets = {
515 wxT(
"5V" ), wxT(
"GND" ), wxT(
"SDA" ), wxT(
"SCL" ),
516 wxT(
"RST" ), wxT(
"BUZZ" ), wxT(
"D5" ), wxT(
"D6" ), wxT(
"AREF" ),
517 wxT(
"ENCA" ), wxT(
"ENCB" ), wxT(
"ENCC" ), wxT(
"EOLR" ), wxT(
"EOLL" ),
520 std::set<wxString> foundNets;
527 foundNets.insert( label->
GetText() );
531 for(
const wxString& net : expectedNets )
534 "Global label for net '" + net +
"' not found" );
541 SCH_SHEET* sheet = LoadGedaSchematic(
"/io/geda/ayab/ayab_rs.sch" );
547 std::map<wxString, int> labelCounts;
554 labelCounts[label->
GetText()]++;
571 SCH_SHEET* sheet = LoadGedaSchematic(
"/io/geda/ayab/ayab_rs.sch" );
579 std::map<wxString, int> powerCounts;
590 if( !libSym || !libSym->
IsPower() )
595 powerCounts[valText]++;
599 "Power symbol ref should start with #PWR, got: " + refText );
614 SCH_SHEET* sheet = LoadGedaSchematic(
"/io/geda/ayab/ayab_rs.sch" );
620 int junctionCount = 0;
630 BOOST_CHECK_GT( junctionCount, 0 );
636 SCH_SHEET* sheet = LoadGedaSchematic(
"/io/geda/ayab/ayab_rs.sch" );
642 std::map<wxString, int> refCounts;
657 for(
const auto& [ref, count] : refCounts )
660 "Refdes '" + ref +
"' appears " + std::to_string( count )
661 +
" times (expected 1)" );
668 SCH_SHEET* sheet = LoadGedaSchematic(
"/io/geda/ayab/ayab_rs.sch" );
689 "Wire start in negative space: ("
690 + std::to_string( start.
x ) +
", "
691 + std::to_string( start.
y ) +
")" );
693 "Wire end in negative space: ("
694 + std::to_string(
end.x ) +
", "
695 + std::to_string(
end.y ) +
")" );
702 SCH_SHEET* sheet = LoadGedaSchematic(
"/io/geda/ayab/ayab_rs.sch" );
717 "Symbol at negative position: ("
718 + std::to_string( pos.
x ) +
", "
719 + std::to_string( pos.
y ) +
")" );
726 SCH_SHEET* sheet = LoadGedaSchematic(
"/io/geda/ayab/ayab_rs.sch" );
732 int rotatedCount = 0;
733 int mirroredCount = 0;
753 "Expected rotated components but found none" );
755 "Expected mirrored components but found none" );
761 SCH_SHEET* sheet = LoadGedaSchematic(
"/io/geda/ayab/ayab_rs.sch" );
768 bool foundTitle =
false;
769 bool foundAuthor =
false;
779 if(
text->GetText().Contains( wxT(
"AYAB Interface" ) ) )
782 if(
text->GetText().Contains( wxT(
"Windell" ) ) )
795 SCH_SHEET* sheet = LoadGedaSchematic(
"/io/geda/ayab/ayab_rs.sch" );
803 std::map<std::pair<int, int>,
int> endpointCounts;
817 endpointCounts[{start.
x, start.
y}]++;
818 endpointCounts[{
end.x,
end.y}]++;
821 int sharedPoints = 0;
823 for(
const auto& [pos, count] : endpointCounts )
832 "Expected at least 50 shared wire endpoints for connectivity, got "
833 + std::to_string( sharedPoints ) );
839 SCH_SHEET* sheet = LoadGedaSchematic(
"/io/geda/ayab/ayab_rs.sch" );
854 "Global label '" + label->
GetText()
855 +
"' at negative position: ("
856 + std::to_string( pos.
x ) +
", "
857 + std::to_string( pos.
y ) +
")" );
864 SCH_SHEET* sheet = LoadGedaSchematic(
"/io/geda/ayab/ayab_rs.sch" );
886 SCH_SHEET* sheet = LoadGedaSchematic(
"/io/geda/powermeter.sch" );
905 BOOST_CHECK( symbolCount > 5 );
906 BOOST_CHECK( wireCount > 10 );
916 SCH_SHEET* sheet = LoadGedaSchematic(
"/io/geda/comments_test.sch" );
942 SCH_SHEET* sheet = LoadGedaSchematic(
"/io/geda/old_format_test.sch" );
949 int noteLineCount = 0;
979 SCH_SHEET* sheet = LoadGedaSchematic(
"/io/geda/old_bus_pin_test.sch" );
1010 SCH_SHEET* sheet = LoadGedaSchematic(
"/io/geda/old_text_test.sch" );
1018 bool foundHello =
false;
1027 if(
text->GetText() == wxT(
"Hello World" ) )
1039 SCH_SHEET* sheet = LoadGedaSchematic(
"/io/geda/very_old_text_test.sch" );
1047 bool foundOldText =
false;
1056 if(
text->GetText() == wxT(
"Old Text" ) )
1057 foundOldText =
true;
1068 SCH_SHEET* sheet = LoadGedaSchematic(
"/io/geda/bus_test.sch" );
1102 SCH_SHEET* sheet = LoadGedaSchematic(
"/io/geda/graphical_test.sch" );
1109 int symbolCount = 0;
1128 SCH_SHEET* sheet = LoadGedaSchematic(
"/io/geda/ayab/ayab_rs.sch" );
1150 SCH_SHEET* sheet = LoadGedaSchematic(
"/io/geda/graphical_test.sch" );
1170 "NC position should be non-zero after coordinate transform" );
1177 SCH_SHEET* sheet = LoadGedaSchematic(
"/io/geda/documentation_test.sch" );
1184 bool foundDatasheet =
false;
1194 if( dsField && dsField->
GetText() == wxT(
"http://www.example.com/datasheet.pdf" ) )
1195 foundDatasheet =
true;
1199 "DATASHEET field with documentation URL not found" );
1205 SCH_SHEET* sheet = LoadGedaSchematic(
"/io/geda/ayab/ayab_rs.sch" );
1221 if( ref != wxT(
"D3" ) )
1226 BOOST_CHECK( descField->
GetText() == wxT(
"9V Power" ) );
1231 BOOST_FAIL(
"D3 symbol not found" );
1237 SCH_SHEET* sheet = LoadGedaSchematic(
"/io/geda/ayab/ayab_rs.sch" );
1244 int notesLineCount = 0;
1269 SCH_SHEET* sheet = LoadGedaSchematic(
"/io/geda/overbar_test.sch" );
1276 std::vector<wxString> textContents;
1283 textContents.push_back(
text->GetText() );
1288 BOOST_REQUIRE_GE( textContents.size(), 6u );
1290 bool foundFullOverbar =
false;
1291 bool foundTrailingOverbar =
false;
1292 bool foundPartialOverbar =
false;
1293 bool foundBackslash =
false;
1294 bool foundNoOverbar =
false;
1295 bool foundMultiOverbar =
false;
1297 for(
const wxString& txt : textContents )
1299 if( txt == wxT(
"~{ACTIVE}" ) )
1300 foundFullOverbar =
true;
1302 if( txt == wxT(
"DATA~{LOW}" ) )
1303 foundTrailingOverbar =
true;
1305 if( txt == wxT(
"ACTIVE ~{HIGH}" ) )
1306 foundPartialOverbar =
true;
1308 if( txt == wxT(
"\\backslash" ) )
1309 foundBackslash =
true;
1311 if( txt == wxT(
"No overbar here" ) )
1312 foundNoOverbar =
true;
1314 if( txt == wxT(
"~{CS} and ~{WR}" ) )
1315 foundMultiOverbar =
true;
1319 "Full overbar \\_ACTIVE\\_ -> ~{ACTIVE} not found" );
1321 "Trailing overbar DATA\\_LOW\\_ -> DATA~{LOW} not found" );
1323 "Partial overbar ACTIVE \\_HIGH\\_ -> ACTIVE ~{HIGH} not found" );
1325 "Escaped backslash \\\\\\\\ -> \\ not found" );
1327 "Plain text 'No overbar here' not found" );
1329 "Multiple overbars \\_CS\\_ and \\_WR\\_ -> ~{CS} and ~{WR} not found" );
1339 SCH_SHEET* sheet = LoadGedaSchematic(
"/io/geda/bezier_test.sch" );
1346 int bezierCount = 0;
1377 SCH_SHEET* sheet = LoadGedaSchematic(
"/io/geda/picture_test.sch" );
1384 int bitmapCount = 0;
1405 SCH_SHEET* sheet = LoadGedaSchematic(
"/io/geda/text_size_test.sch" );
1412 std::vector<SCH_TEXT*> texts;
1417 texts.push_back(
static_cast<SCH_TEXT*
>( item ) );
1420 BOOST_REQUIRE_GE( texts.size(), 2u );
1422 bool foundSize10 =
false;
1423 bool foundSize20 =
false;
1427 int h = t->GetTextSize().y;
1429 if( h == 10 * 10 * 254 )
1431 else if( h == 20 * 10 * 254 )
1443 SCH_SHEET* sheet = LoadGedaSchematic(
"/io/geda/text_angle_test.sch" );
1450 std::set<int> angles;
1463 BOOST_CHECK( angles.count( 900 ) > 0 );
1464 BOOST_CHECK( angles.count( 0 ) > 0 );
1465 BOOST_CHECK( angles.count( 1800 ) > 0 );
1473 SCH_SHEET* sheet = LoadGedaSchematic(
"/io/geda/relative_path_test.sch" );
1508 SCH_SHEET* sheet = LoadGedaSchematic(
"/io/geda/embedded_prefix_test.sch" );
1515 int symbolCount = 0;
1526 "Symbol name should not have EMBEDDED prefix: " +
name );
1545 SCH_SHEET* sheet = LoadGedaSchematic(
"/io/geda/lepton_conf_test.sch" );
1552 bool foundR1 =
false;
1562 if( ref == wxT(
"R1" ) )
1565 int pinCount =
static_cast<int>( sym->
GetLibPins().size() );
1568 "R1 pin count mismatch: expected 2 got "
1569 + std::to_string( pinCount )
1570 +
" (lepton.conf library discovery may have failed)" );
1585 SCH_SHEET* sheet = LoadGedaSchematic(
"/io/geda/gschemrc_test.sch" );
1600 if( ref == wxT(
"R1" ) )
1602 int pinCount =
static_cast<int>( sym->
GetLibPins().size() );
1605 "R1 pin count mismatch: expected 2 got "
1606 + std::to_string( pinCount )
1607 +
" (gschemrc library discovery may have failed)" );
1612 BOOST_FAIL(
"R1 symbol not found" );
1625 SCH_SHEET* sheet = LoadGedaSchematic(
"/io/geda/bus_ripper_test.sch" );
1632 int busEntryCount = 0;
1647 "Bus entry x-size should be negative (wire goes left)" );
1676 m_plugin.SetReporter( &reporter );
1678 SCH_SHEET* sheet = LoadGedaSchematic(
"/io/geda/symversion_test.sch" );
1686 "Expected symversion mismatch warning in reporter output, got: "
1689 "Expected R1 reference in warning message, got: " + messages );
1696 m_plugin.SetReporter( &reporter );
1698 SCH_SHEET* sheet = LoadGedaSchematic(
"/io/geda/fuzzy_match_test.sch" );
1705 "Expected fuzzy match suggestion in reporter output, got: "
1708 "Expected 'resistor-1.sym' as suggestion, got: " + messages );
1720 SCH_SHEET* sheet = LoadGedaSchematic(
"/io/geda/hierarchy_test.sch" );
1729 bool foundS1 =
false;
1739 if(
name == wxT(
"S1" ) )
1749 BOOST_REQUIRE_MESSAGE( subScreen,
"Sub-sheet screen should not be null" );
1751 int subWireCount = 0;
1765 "Sub-schematic should contain wires" );
1788 SCH_SHEET* sheet = LoadGedaSchematic(
"/io/geda/hierarchy_test.sch" );
1805 SCH_SHEET* sheet = LoadGedaSchematic(
"/io/geda/multislot_test.sch" );
1812 std::vector<SCH_SYMBOL*> symbols;
1817 symbols.push_back(
static_cast<SCH_SYMBOL*
>( item ) );
1820 BOOST_REQUIRE_EQUAL( symbols.size(), 2u );
1823 std::sort( symbols.begin(), symbols.end(),
1826 return a->GetPosition().x < b->GetPosition().x;
1830 std::set<wxString> slot1Pins;
1832 for(
SCH_PIN*
pin : symbols[0]->GetLibPins() )
1833 slot1Pins.insert(
pin->GetNumber() );
1841 std::set<wxString> slot2Pins;
1843 for(
SCH_PIN*
pin : symbols[1]->GetLibPins() )
1844 slot2Pins.insert(
pin->GetNumber() );
1861 SCH_SHEET* sheet = LoadGedaSchematic(
"/io/geda/graphical_attr_test.sch" );
1868 bool foundR1 =
false;
1869 bool foundR2 =
false;
1879 if( ref == wxT(
"R1" ) )
1887 if( ref == wxT(
"R2" ) )
1911 std::map<std::string, UTF8> props;
1912 props[
"additional_schematics"] = page2Path;
1914 SCH_SHEET* sheet = LoadGedaSchematicWithProperties(
"/io/geda/multipage_page1.sch", props );
1937 subSheet =
static_cast<SCH_SHEET*
>( item );
1950 wxT(
"multipage_page2.sch" ) );
1954 BOOST_REQUIRE_MESSAGE( subScreen,
"Sub-sheet screen should not be null" );
1956 int subWireCount = 0;
1975 std::vector<wxString> builtinNames = {
1976 wxT(
"resistor-1.sym" ), wxT(
"resistor-2.sym" ),
1977 wxT(
"capacitor-1.sym" ), wxT(
"capacitor-2.sym" ),
1978 wxT(
"gnd-1.sym" ), wxT(
"gnd-2.sym" ),
1979 wxT(
"generic-power.sym" ),
1980 wxT(
"input-1.sym" ), wxT(
"output-1.sym" ),
1981 wxT(
"nc-right-1.sym" ), wxT(
"nc-left-1.sym" ),
1982 wxT(
"terminal-1.sym" ),
1983 wxT(
"vcc-1.sym" ), wxT(
"vcc-2.sym" ),
1984 wxT(
"vdd-1.sym" ), wxT(
"vss-1.sym" ),
1986 wxT(
"5V-plus-1.sym" ), wxT(
"3.3V-plus-1.sym" ),
1987 wxT(
"12V-plus-1.sym" ),
1988 wxT(
"diode-1.sym" ), wxT(
"zener-1.sym" ),
1989 wxT(
"schottky-1.sym" ), wxT(
"led-1.sym" ),
1990 wxT(
"npn-1.sym" ), wxT(
"pnp-1.sym" ),
1991 wxT(
"nmos-1.sym" ), wxT(
"pmos-1.sym" ),
1992 wxT(
"opamp-1.sym" ), wxT(
"inductor-1.sym" ),
1993 wxT(
"7400-1.sym" ), wxT(
"7402-1.sym" ),
1994 wxT(
"7404-1.sym" ), wxT(
"7408-1.sym" ),
1995 wxT(
"7432-1.sym" ), wxT(
"7486-1.sym" ),
1996 wxT(
"busripper-1.sym" ), wxT(
"busripper-2.sym" ),
1997 wxT(
"title-B.sym" ),
2002 for(
const wxString&
name : builtinNames )
2005 "Builtin symbol should exist: " +
name );
2007 if( symbols.find(
name ) != symbols.end() )
2009 const wxString& content = symbols.at(
name );
2011 "Builtin symbol should start with version line: " +
name );
2015 BOOST_CHECK_GE( symbols.size(), builtinNames.size() );
2021 SCH_SHEET* sheet = LoadGedaSchematic(
"/io/geda/tjunction_test.sch" );
2027 int junctionCount = 0;
2052 auto it = builtins.find( wxT(
"7400-1.sym" ) );
2059 wxString tempPath = wxFileName::CreateTempFileName( wxT(
"geda_pin_test_" ) );
2063 wxFile temp( tempPath, wxFile::write );
2065 temp.Write( it->second );
2069 std::unique_ptr<LIB_SYMBOL> sym;
2077 wxRemoveFile( tempPath );
2080 SCH_SHEET* sheet = LoadGedaSchematic(
"/io/geda/minimal_test.sch" );
2104 std::vector<SCH_PIN*> pins = libSym->
GetPins();
2106 BOOST_REQUIRE_GE( pins.size(), 2u );
2109 bool hasRight =
false;
2110 bool hasLeft =
false;
2122 "Resistor should have both PIN_RIGHT and PIN_LEFT pins" );
2130 SCH_SHEET* sheet = LoadGedaSchematic(
"/io/geda/ayab/ayab_rs.sch" );
2139 int pageWidthMils =
schIUScale.IUToMils( pageSizeIU.
x );
2140 int pageHeightMils =
schIUScale.IUToMils( pageSizeIU.
y );
2144 BOOST_CHECK_LT( pageWidthMils, 40000 );
2145 BOOST_CHECK_LT( pageHeightMils, 30000 );
2146 BOOST_CHECK_GT( pageWidthMils, 20000 );
2147 BOOST_CHECK_GT( pageHeightMils, 15000 );
2153 bbox.
Merge( item->GetBoundingBox() );
2161 BOOST_CHECK_GE( bbox.
GetOrigin().
x, -margin );
2162 BOOST_CHECK_GE( bbox.
GetOrigin().
y, -margin );
2163 BOOST_CHECK_LE( bbox.
GetEnd().
x, pageSizeIU.
x + margin );
2164 BOOST_CHECK_LE( bbox.
GetEnd().
y, pageSizeIU.
y + margin );
2177 SCH_SHEET* sheet = LoadGedaSchematic(
"/io/geda/power_override_test/power_override_test.sch" );
2182 bool foundPower =
false;
2204 "gnd-1.sym without net= attribute should still be detected as power "
2205 "symbol when builtin has net=GND:1" );
2213 std::map<std::string, UTF8> props;
2214 props[
"sym_search_paths"] = extraDir;
2216 SCH_SHEET* sheet = LoadGedaSchematicWithProperties(
"/io/geda/props_test.sch", props );
2229 int pinCount =
static_cast<int>( sym->
GetLibPins().size() );
2232 "Expected 2-pin symbol from extra-syms, got "
2233 + std::to_string( pinCount ) );
2237 BOOST_FAIL(
"Symbol not found" );
constexpr EDA_IU_SCALE schIUScale
constexpr const Vec GetEnd() const
constexpr size_type GetWidth() const
constexpr BOX2< Vec > & Merge(const BOX2< Vec > &aRect)
Modify the position and size of the rectangle in order to contain aRect.
constexpr size_type GetHeight() const
constexpr const Vec & GetOrigin() const
int AsTenthsOfADegree() const
const EDA_ANGLE & GetTextAngle() const
virtual const wxString & GetText() const
Return the string associated with the text object.
virtual bool IsVisible() const
const UTF8 & GetLibItemName() const
Define a library symbol object.
bool IsPower() const override
std::vector< SCH_PIN * > GetPins() const override
bool IsGlobalPower() const override
Describe the page size and margins of a paper page on which to eventually print or plot.
const VECTOR2D GetSizeIU(double aIUScale) const
Gets the page size in internal units.
Holds all the data relating to one schematic.
Class for a wire to bus entry.
virtual const wxString & GetText() const override
Return the string associated with the text object.
A SCH_IO derivation for loading gEDA/gschem schematic files (.sch).
static const std::map< wxString, wxString > & getBuiltinSymbols()
Return the map of built-in gEDA symbol definitions (symbol name -> .sym content).
Base class for any item which can be embedded within the SCHEMATIC container class,...
SCH_LAYER_ID GetLayer() const
Return the layer this item is on.
Segment description base class to describe items which have 2 end points (track, wire,...
VECTOR2I GetEndPoint() const
VECTOR2I GetStartPoint() const
VECTOR2I GetPosition() const override
const PAGE_INFO & GetPageSettings() const
EE_RTREE & Items()
Get the full RTree, usually for iterating.
Sheet symbol placed in a schematic, and is the entry point for a sub schematic.
SCH_FIELD * GetField(FIELD_T aFieldType)
Return a mandatory field in this sheet.
SCH_SCREEN * GetScreen() const
bool GetExcludedFromSim(const SCH_SHEET_PATH *aInstance=nullptr, const wxString &aVariantName=wxEmptyString) const override
bool GetExcludedFromBOM(const SCH_SHEET_PATH *aInstance=nullptr, const wxString &aVariantName=wxEmptyString) const override
VECTOR2I GetPosition() const override
const LIB_ID & GetLibId() const override
std::vector< SCH_PIN * > GetLibPins() const
Populate a vector with all the pins from the library object that match the current unit and bodyStyle...
bool GetExcludedFromBoard(const SCH_SHEET_PATH *aInstance=nullptr, const wxString &aVariantName=wxEmptyString) const override
int GetOrientation() const override
Get the display symbol orientation.
std::unique_ptr< LIB_SYMBOL > & GetLibSymbolRef()
SCH_FIELD * GetField(FIELD_T aFieldType)
Return a mandatory field in this symbol.
VECTOR2I GetPosition() const override
A wrapper for reporting to a wxString object.
const wxString & GetMessages() const
std::string GetEeschemaTestDataDir()
Get the configured location of Eeschema test data.
EDA_ANGLE abs(const EDA_ANGLE &aAngle)
@ PIN_RIGHT
The pin extends rightwards from the connection point.
@ PIN_LEFT
The pin extends leftwards from the connection point: Probably on the right side of the symbol.
SCH_SHEET * LoadGedaSchematicWithProperties(const std::string &aRelPath, const std::map< std::string, UTF8 > &aProps)
SETTINGS_MANAGER m_manager
~GEDA_SCH_IMPORT_FIXTURE()
GEDA_SCH_IMPORT_FIXTURE()
std::unique_ptr< SCHEMATIC > m_schematic
SCH_SHEET * LoadGedaSchematic(const std::string &aRelPath)
@ DESCRIPTION
Field Description of part, i.e. "1/4W 1% Metal Film Resistor".
@ FOOTPRINT
Field Name Module PCB, i.e. "16DIP300".
@ DATASHEET
name of datasheet
@ REFERENCE
Field Reference of part, i.e. "IC21".
@ VALUE
Field Value of part, i.e. "3.3K".
BOOST_AUTO_TEST_CASE(HorizontalAlignment)
BOOST_AUTO_TEST_CASE(CanReadSchematicFile)
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")
BOOST_CHECK_EQUAL(result, "25.4")
VECTOR2< int32_t > VECTOR2I