KiCad PCB EDA Suite
test_sch_sheet_list.cpp File Reference

Go to the source code of this file.

Classes

class  TEST_SCH_SHEET_LIST_FIXTURE
 

Functions

 BOOST_AUTO_TEST_CASE (TestSheetListPageProperties)
 

Function Documentation

◆ BOOST_AUTO_TEST_CASE()

BOOST_AUTO_TEST_CASE ( TestSheetListPageProperties  )

Definition at line 106 of file test_sch_sheet_list.cpp.

107 {
108  loadSchematic( "complex_hierarchy" );
109 
110  SCH_SHEET_LIST sheets = m_schematic.GetSheets();
111 
113 
114  sheets.SetInitialPageNumbers();
115 
116  // The root sheet should now be page 1.
117  BOOST_CHECK_EQUAL( sheets.at( 0 ).GetPageNumber(), "1" );
118  BOOST_CHECK_EQUAL( sheets.at( 1 ).GetPageNumber(), "2" );
119  BOOST_CHECK_EQUAL( sheets.at( 2 ).GetPageNumber(), "3" );
120 }
A container for handling SCH_SHEET_PATH objects in a flattened hierarchy.
BOOST_CHECK(v2.Cross(v1)==1)
bool AllSheetPageNumbersEmpty() const
Check all of the sheet instance for empty page numbers.
void SetInitialPageNumbers()
Set initial sheet page numbers.

References SCH_SHEET_LIST::AllSheetPageNumbersEmpty(), BOOST_CHECK(), and SCH_SHEET_LIST::SetInitialPageNumbers().