25#include <boost/test/unit_test.hpp>
35 const wxString& aFileName )
59 BOOST_CHECK( virtualRoot.
GetScreen() ==
nullptr );
68 schematic.SetTopLevelSheets( { sheet1 } );
71 const std::vector<SCH_SHEET*>& topSheets = schematic.GetTopLevelSheets();
83 schematic.SetTopLevelSheets( { sheet1 } );
86 for(
int i = 2; i <= 3; i++ )
89 wxString::Format(
"sheet%d.kicad_sch", i ) );
90 schematic.AddTopLevelSheet( sheet );
94 const std::vector<SCH_SHEET*>& topSheets = schematic.GetTopLevelSheets();
107 schematic.SetTopLevelSheets( { sheet1 } );
110 schematic.AddTopLevelSheet( sheet2 );
113 schematic.RemoveTopLevelSheet( sheet1 );
116 const std::vector<SCH_SHEET*>& topSheets = schematic.GetTopLevelSheets();
123 BOOST_CHECK( !schematic.RemoveTopLevelSheet( topSheets[0] ) );
141 schematic.SetTopLevelSheets( { top1, top2 } );
156 schematic.SetTopLevelSheets( { baseSheet } );
161 schematic.AddTopLevelSheet( copiedSheet );
166 schematic.SetTopLevelSheets( { copiedSheet, baseSheet } );
171 BOOST_CHECK( schematic.RemoveTopLevelSheet( baseSheet ) );
186 BOOST_CHECK( info1 == info2 );
190 BOOST_CHECK( info1 != info3 );
virtual void SetParent(EDA_ITEM *aParent)
Holds all the data relating to one schematic.
void Append(SCH_ITEM *aItem, bool aUpdateLibSymbol=true)
const KIID & GetUuid() const
A container for handling SCH_SHEET_PATH objects in a flattened hierarchy.
Sheet symbol placed in a schematic, and is the entry point for a sub schematic.
void SetFileName(const wxString &aFilename)
void SetName(const wxString &aName)
SCH_SCREEN * GetScreen() const
void SetScreen(SCH_SCREEN *aScreen)
Set the SCH_SCREEN associated with this sheet to aScreen.
Information about a top-level schematic sheet.
KIID uuid
Unique identifier for the sheet.
wxString name
Display name for the sheet.
wxString filename
Relative path to the sheet file.
BOOST_AUTO_TEST_CASE(HorizontalAlignment)
BOOST_AUTO_TEST_SUITE(CadstarPartParser)
BOOST_AUTO_TEST_SUITE_END()
static SCH_SHEET * createTopLevelSheet(SCHEMATIC &aSchematic, const wxString &aName, const wxString &aFileName)
BOOST_AUTO_TEST_CASE(TestVirtualRootCreation)
BOOST_CHECK_EQUAL(result, "25.4")