36 const wxString& aLibName = wxS(
"TestPart" ) )
72 SCH_REFERENCE testRef = createTestReference(
"U",
"LM358", 1 );
73 std::map<int, std::vector<SCH_REFERENCE>> emptyMap;
74 std::vector<int> emptyUnits;
88 SCH_REFERENCE icRef = createTestReference(
"IC",
"74HC00", 1 );
115 std::map<int, std::vector<SCH_REFERENCE>> emptyMap;
116 std::vector<int> emptyUnits;
148 SCH_REFERENCE testRef = createTestReference(
"C",
"100nF", 1 );
149 std::map<int, std::vector<SCH_REFERENCE>> emptyMap;
150 std::vector<int> emptyUnits;
188 SCH_REFERENCE testRef = createTestReference(
"U",
"LM358", 1 );
189 std::map<int, std::vector<SCH_REFERENCE>> emptyMap;
190 std::vector<int> emptyUnits;
196 std::string serialized = tracker.
Serialize();
A generic fixture for loading schematics and associated settings for qa tests.
A logical library item identifier and consists of various portions much like a URI.
Class to efficiently track reference designators and provide next available designators.
bool Deserialize(const std::string &aData)
Deserialize tracker data from string representation.
int GetNextRefDesForUnits(const SCH_REFERENCE &aRef, const std::map< int, std::vector< SCH_REFERENCE > > &aRefNumberMap, const std::vector< int > &aRequiredUnits, int aMinValue, const std::function< bool(int)> &aAcceptNumber={})
Get the next available reference designator number for multi-unit symbols.
void SetReuseRefDes(bool aReuse)
bool Insert(const std::string &aRefDes)
Insert a reference designator into the tracker.
size_t Size() const
Get the total count of stored reference designators.
std::string Serialize() const
Serialize the tracker data to a compact string representation.
bool Contains(const std::string &aRefDes) const
Check if a reference designator exists in the tracker.
A helper to define a symbol's reference designator in a schematic.
void SetValue(const wxString &aValue)
void SetRef(const wxString &aReference)
Handle access to a stack of flattened SCH_SHEET objects by way of a path for creating a flattened sch...
void SetLibId(const LIB_ID &aName)
std::vector< std::unique_ptr< SCH_SYMBOL > > m_symbols
SCH_REFERENCE createTestReference(const wxString &aRef, const wxString &aValue, int aUnit, const wxString &aLibName=wxS("TestPart"))
SCH_REFERENCE holds a raw pointer to its symbol and CompareLibName dereferences it,...
BOOST_AUTO_TEST_CASE(GetNextRefDesForUnits_Integration)
BOOST_AUTO_TEST_CASE(HorizontalAlignment)
BOOST_CHECK(res.column_datatype(0)==SQL_NUMERIC||res.column_datatype(0)==SQL_DECIMAL)
BOOST_CHECK_EQUAL(std::any_cast< std::string >(rows[0].at("val")), "12345678901234567.89")
BOOST_AUTO_TEST_SUITE_END()