25#include <boost/test/unit_test.hpp>
45 BOOST_CHECK( virtualRoot.
GetScreen() ==
nullptr );
57 schematic.
SetRoot( virtualRoot );
85 schematic.
SetRoot( virtualRoot );
88 for(
int i = 1; i <= 3; i++ )
91 sheet->
SetName( wxString::Format(
"Sheet%d", i ) );
116 schematic.
SetRoot( virtualRoot );
154 schematic.
SetRoot( virtualRoot );
157 for(
int i = 1; i <= 2; i++ )
160 topSheet->
SetName( wxString::Format(
"TopSheet%d", i ) );
161 topSheet->
SetFileName( wxString::Format(
"top_sheet_%d.kicad_sch", i ) );
169 childSheet->
SetName( wxString::Format(
"ChildSheet%d", i ) );
170 childSheet->
SetFileName( wxString::Format(
"child_sheet_%d.kicad_sch", i ) );
175 topScreen->
Append( childSheet );
198 BOOST_CHECK( info1 == info2 );
202 BOOST_CHECK( info1 != info3 );
virtual void SetParent(EDA_ITEM *aParent)
Holds all the data relating to one schematic.
void AddTopLevelSheet(SCH_SHEET *aSheet)
Add a new top-level sheet to the schematic.
SCH_SHEET_LIST Hierarchy() const
Return the full schematic flattened hierarchical sheet list.
bool RemoveTopLevelSheet(SCH_SHEET *aSheet)
Remove a top-level sheet from the schematic.
void SetRoot(SCH_SHEET *aRootSheet)
Initialize the schematic with a new root sheet.
std::vector< SCH_SHEET * > GetTopLevelSheets() const
Get the list of top-level sheets.
void Append(SCH_ITEM *aItem, bool aUpdateLibSymbol=true)
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()
BOOST_AUTO_TEST_CASE(TestVirtualRootCreation)
BOOST_CHECK_EQUAL(result, "25.4")