37 fn.AppendDir(
"netlists" );
39 wxString
path = fn.GetFullPath();
42 return wxFileName(
path );
53 SCH_SHEET_LIST sheets = m_schematic.BuildSheetListSortedByPageNumbers();
71 LoadSchematic(
"complex_hierarchy_shared/ampli_ht/ampli_ht" );
73 SCH_SHEET_LIST sheets = m_schematic.BuildSheetListSortedByPageNumbers();
83 LoadSchematic(
"complex_hierarchy_shared/complex_hierarchy" );
85 SCH_SHEET_LIST sheets = m_schematic.BuildSheetListSortedByPageNumbers();
97 SCH_SHEET_LIST sheets = m_schematic.BuildSheetListSortedByPageNumbers();
100 sheets.at( 0 ).SetPageNumber(
"A" );
101 sheets.at( 1 ).SetPageNumber(
"B" );
102 sheets.at( 2 ).SetPageNumber(
"C" );
103 sheets.at( 3 ).SetPageNumber(
"D" );
104 sheets.at( 4 ).SetPageNumber(
"E" );
107 wxFileName rootFn = GetSchematicPath(
"complex_hierarchy_shared/complex_hierarchy" );
108 wxFileName prjFn = rootFn;
112 rootFn.AppendDir(
"temp" );
113 BOOST_CHECK( rootFn.Mkdir() );
115 wxFileName newPrjFn = rootFn;
117 BOOST_CHECK( wxCopyFile( prjFn.GetFullPath(), newPrjFn.GetFullPath() ) );
119 m_pi->SaveSchematicFile( rootFn.GetFullPath(), &m_schematic.Root(), &m_schematic );
121 wxFileName subSheetFn = rootFn;
122 BOOST_CHECK( subSheetFn.AppendDir(
"ampli_ht" ) );
123 BOOST_CHECK( subSheetFn.Mkdir() );
125 subSheetFn.SetName(
"ampli_ht" );
126 m_pi->SaveSchematicFile( subSheetFn.GetFullPath(), sheets.at( 1 ).Last(), &m_schematic );
128 subSheetFn.SetName(
"filter" );
129 m_pi->SaveSchematicFile( subSheetFn.GetFullPath(), sheets.at( 2 ).Last(), &m_schematic );
131 LoadSchematic(
"complex_hierarchy_shared/temp/complex_hierarchy" );
133 sheets = m_schematic.BuildSheetListSortedByPageNumbers();
143 BOOST_CHECK( wxRemoveFile( subSheetFn.GetFullPath() ) );
144 subSheetFn.SetName(
"ampli_ht" );
145 BOOST_CHECK( wxRemoveFile( subSheetFn.GetFullPath() ) );
146 BOOST_CHECK( subSheetFn.Rmdir() );
147 BOOST_CHECK( wxRemoveFile( newPrjFn.GetFullPath() ) );
148 BOOST_CHECK( wxRemoveFile( rootFn.GetFullPath() ) );
149 BOOST_CHECK( rootFn.Rmdir() );
156 LoadSchematic(
"complex_hierarchy_shared/ampli_ht/ampli_ht" );
158 SCH_SHEET_LIST sheets = m_schematic.BuildSheetListSortedByPageNumbers();
A generic fixture for loading schematics and associated settings for qa tests.
A container for handling SCH_SHEET_PATH objects in a flattened hierarchy.
void SetInitialPageNumbers()
Set initial sheet page numbers.
bool AllSheetPageNumbersEmpty() const
Check all of the sheet instance for empty page numbers.
wxFileName GetSchematicPath(const wxString &aRelativePath) override
static const std::string ProjectFileExtension
static const std::string KiCadSchematicFileExtension
std::string GetEeschemaTestDataDir()
Get the configured location of Eeschema test data.
static void LoadSchematic(SCHEMATIC *aSchematic, SCH_SHEET *aRootSheet, const wxString &aFileName)
Definition of the SCH_SHEET_PATH and SCH_SHEET_LIST classes for Eeschema.
BOOST_CHECK_EQUAL(ret, c.m_exp_result)
BOOST_AUTO_TEST_SUITE_END()
BOOST_AUTO_TEST_CASE(TestSheetListPageProperties)
BOOST_TEST_CONTEXT("Test Clearance")
Definition of file extensions used in Kicad.