41void checkRootSheetName(
const wxString& aSchPath,
bool aForceDefaultProject,
42 const wxString& aExpected )
46 std::unique_ptr<SCHEMATIC> sch(
50 SCH_SHEET* root = sch->GetTopLevelSheet();
55 BOOST_REQUIRE_EQUAL( hierarchy.size(), 1u );
57 wxString token = wxS(
"SHEETNAME" );
58 BOOST_REQUIRE( sch->ResolveTextVar( &hierarchy.at( 0 ), &token, 0 ) );
69 + wxS(
"issue24360/issue24360.kicad_sch" );
71 checkRootSheetName( schPath,
true,
_(
"Root" ) );
80 + wxS(
"issue24360_project/issue24360_project.kicad_sch" );
82 checkRootSheetName( schPath,
false,
83 wxS(
"Custom Display Name" ) );
static SCHEMATIC * LoadSchematic(const wxString &aFileName, bool aSetActive, bool aForceDefaultProject, PROJECT *aProject=nullptr, bool aCalculateConnectivity=true)
Instantiate the current locale within a scope in which you are expecting exceptions to be thrown.
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.
std::string GetEeschemaTestDataDir()
Get the configured location of Eeschema test data.
Definition of the SCH_SHEET_PATH and SCH_SHEET_LIST classes for Eeschema.
std::vector< FAB_LAYER_COLOR > dummy
BOOST_REQUIRE(intersection.has_value()==c.ExpectedIntersection.has_value())
BOOST_AUTO_TEST_CASE(Issue24360_RootSheetNameFallback)
BOOST_CHECK_EQUAL(result, "25.4")