20#include <boost/test/unit_test.hpp>
54 graph->
Recalculate( m_schematic->BuildSheetListSortedByPageNumbers(),
true );
57 std::map<wxString, wxString> classes;
58 std::map<wxString, KIGFX::COLOR4D> colors;
59 classes[wxT(
"MY_CHAIN" )] = wxT(
"DDR_DATA" );
80 BOOST_CHECK_CLOSE( committed->
GetColor().
r, 1.0, 1e-6 );
81 BOOST_CHECK_CLOSE( committed->
GetColor().
g, 0.5, 1e-6 );
82 BOOST_CHECK_CLOSE( committed->
GetColor().
b, 0.25, 1e-6 );
83 BOOST_CHECK_CLOSE( committed->
GetColor().
a, 1.0, 1e-6 );
100 graph->
Recalculate( m_schematic->BuildSheetListSortedByPageNumbers(),
true );
Calculate the connectivity of a schematic and generates netlists.
void SetNetChainColorOverrides(const std::map< wxString, COLOR4D > &aOverrides)
void SetNetChainNetClassOverrides(const std::map< wxString, wxString > &aOverrides)
Stash per-net-chain netclass overrides read from the schematic file.
SCH_NETCHAIN * CreateNetChainFromPotential(SCH_NETCHAIN *aPotential, const wxString &aName)
Promote a potential net chain to an actual user net chain with the provided name.
void Recalculate(const SCH_SHEET_LIST &aSheetList, bool aUnconditional=false, std::function< void(SCH_ITEM *)> *aChangedItemHandler=nullptr, PROGRESS_REPORTER *aProgressReporter=nullptr)
Update the connection graph for the given list of sheets.
const std::vector< std::unique_ptr< SCH_NETCHAIN > > & GetPotentialNetChains() const
Potential net chains are inferred groupings produced by RebuildNetChains() but not yet user-committed...
A color representation with 4 components: red, green, blue, alpha.
static const COLOR4D UNSPECIFIED
For legacy support; used as a value to indicate color hasn't been set yet.
Instantiate the current locale within a scope in which you are expecting exceptions to be thrown.
A net chain is a collection of nets that are connected together through passive components.
const wxString & GetNetClass() const
const KIGFX::COLOR4D & GetColor() const
const wxString & GetName() const
void LoadSchematic(SETTINGS_MANAGER &aSettingsManager, const wxString &aRelPath, std::unique_ptr< SCHEMATIC > &aSchematic)
std::vector< FAB_LAYER_COLOR > dummy
std::unique_ptr< SCHEMATIC > m_schematic
SETTINGS_MANAGER m_settingsManager
SIGNALS_CLASS_COLOR_FIXTURE()
BOOST_REQUIRE(intersection.has_value()==c.ExpectedIntersection.has_value())
BOOST_FIXTURE_TEST_CASE(NetChain_ApplyClassAndColorOverrides, SIGNALS_CLASS_COLOR_FIXTURE)
BOOST_CHECK_EQUAL(result, "25.4")