44 for(
unsigned i = 0; i < 4; ++i )
48 std::ostringstream ss;
83 BOOST_CHECK_EQUAL( m_empty_path.size(), 0 );
85 BOOST_CHECK_THROW( m_empty_path.at( 0 ), std::out_of_range );
91 BOOST_CHECK_EQUAL( m_empty_path.Last(),
nullptr );
92 BOOST_CHECK_EQUAL( m_empty_path.LastScreen(),
nullptr );
94 BOOST_CHECK_EQUAL( m_empty_path.PathAsString(),
"/" );
95 BOOST_CHECK_EQUAL( m_empty_path.PathHumanReadable(),
"/" );
104 BOOST_CHECK_EQUAL( m_linear.size(), 3 );
106 BOOST_CHECK_EQUAL( m_linear.at( 0 ), &m_sheets[0] );
107 BOOST_CHECK_EQUAL( m_linear.at( 1 ), &m_sheets[1] );
108 BOOST_CHECK_EQUAL( m_linear.at( 2 ), &m_sheets[2] );
110 BOOST_CHECK_EQUAL( m_linear.Last(), &m_sheets[2] );
111 BOOST_CHECK_EQUAL( m_linear.LastScreen(),
nullptr );
114 BOOST_CHECK_PREDICATE(
118 BOOST_CHECK_EQUAL( m_linear.PathHumanReadable(),
"/Sheet1/Sheet2/" );
148BOOST_AUTO_TEST_SUITE_END()
Handle access to a stack of flattened SCH_SHEET objects by way of a path for creating a flattened sch...
void push_back(SCH_SHEET *aSheet)
Forwarded method from std::vector.
std::vector< SCH_SHEET > m_sheets
handy store of SCH_SHEET objects
SCH_SHEET_PATH m_empty_path
SCH_SHEET_PATH m_linear
We look at sheet 2 in the hierarchy: Sheets: 0 -> 1 -> 2.
TEST_SCH_SHEET_PATH_FIXTURE()
bool IsUUIDPathWithLevels(const std::string &aStr, unsigned aLevels)
Predicate to check a string is a UUID path format.
Definition of the SCH_SHEET_PATH and SCH_SHEET_LIST classes for Eeschema.
BOOST_CHECK(box.ClosestPointTo(VECTOR2D(0, 0))==VECTOR2D(1, 2))
Test suite for KiCad math code.
BOOST_AUTO_TEST_CASE(Empty)
Declare the test suite.
Test utilities for timestamps.