KiCad PCB EDA Suite
Loading...
Searching...
No Matches
test_flat_hierarchy.cpp File Reference
#include <boost/test/unit_test.hpp>
#include <eeschema_test_utils.h>
#include <sch_sheet.h>
#include <sch_screen.h>
#include <schematic.h>
#include <project.h>
#include <settings/settings_manager.h>
#include <project/project_file.h>

Go to the source code of this file.

Classes

struct  FLAT_HIERARCHY_FIXTURE
 Test flat top-level schematic sheets functionality. More...
 

Functions

 BOOST_AUTO_TEST_CASE (TestCreateDefaultScreens)
 Test that CreateDefaultScreens creates a virtual root with one top-level sheet.
 
 BOOST_AUTO_TEST_CASE (TestAddTopLevelSheets)
 Test adding multiple top-level sheets.
 
 BOOST_AUTO_TEST_CASE (TestRemoveTopLevelSheet)
 Test removing top-level sheets.
 
 BOOST_AUTO_TEST_CASE (TestBuildSheetList)
 Test building sheet list from multiple top-level sheets.
 
 BOOST_AUTO_TEST_CASE (TestProjectFileSerialization)
 Test project file serialization of top-level sheets.
 
 BOOST_AUTO_TEST_CASE (TestRootScreen)
 Test that hierarchy is correctly built with multiple top-level sheets TODO: This test currently fails due to recursion detection - needs investigation.
 

Function Documentation

◆ BOOST_AUTO_TEST_CASE() [1/6]

BOOST_AUTO_TEST_CASE ( TestAddTopLevelSheets )

◆ BOOST_AUTO_TEST_CASE() [2/6]

BOOST_AUTO_TEST_CASE ( TestBuildSheetList )

Test building sheet list from multiple top-level sheets.

Definition at line 179 of file test_flat_hierarchy.cpp.

References BOOST_CHECK_EQUAL(), SCH_SHEET::GetField(), SCH_SCREEN::SetFileName(), BASE_SCREEN::SetPageNumber(), SCH_SHEET::SetScreen(), SCH_FIELD::SetText(), and SHEET_NAME.

◆ BOOST_AUTO_TEST_CASE() [3/6]

BOOST_AUTO_TEST_CASE ( TestCreateDefaultScreens )

Test that CreateDefaultScreens creates a virtual root with one top-level sheet.

Definition at line 66 of file test_flat_hierarchy.cpp.

References BOOST_AUTO_TEST_CASE(), BOOST_CHECK_EQUAL(), SCH_SHEET::GetScreen(), SCH_SCREEN::GetSheets(), EDA_ITEM::m_Uuid, and niluuid.

◆ BOOST_AUTO_TEST_CASE() [4/6]

BOOST_AUTO_TEST_CASE ( TestProjectFileSerialization )

Test project file serialization of top-level sheets.

Definition at line 207 of file test_flat_hierarchy.cpp.

References BOOST_CHECK_EQUAL(), and PROJECT_FILE::GetTopLevelSheets().

◆ BOOST_AUTO_TEST_CASE() [5/6]

BOOST_AUTO_TEST_CASE ( TestRemoveTopLevelSheet )

Test removing top-level sheets.

Definition at line 143 of file test_flat_hierarchy.cpp.

References BOOST_CHECK_EQUAL(), SCH_SHEET::GetField(), SCH_SHEET::SetScreen(), SCH_FIELD::SetText(), and SHEET_NAME.

◆ BOOST_AUTO_TEST_CASE() [6/6]

BOOST_AUTO_TEST_CASE ( TestRootScreen )

Test that hierarchy is correctly built with multiple top-level sheets TODO: This test currently fails due to recursion detection - needs investigation.

Test RootScreen returns the first top-level sheet's screen

Definition at line 289 of file test_flat_hierarchy.cpp.

References BOOST_CHECK_EQUAL().