42void checkRootSheetName(
const wxString& aSchPath,
bool aForceDefaultProject,
43 const wxString& aExpected )
47 std::unique_ptr<SCHEMATIC> sch(
51 SCH_SHEET* root = sch->GetTopLevelSheet();
56 BOOST_REQUIRE_EQUAL( hierarchy.size(), 1u );
58 wxString token = wxS(
"SHEETNAME" );
59 BOOST_REQUIRE( sch->ResolveTextVar( &hierarchy.at( 0 ), &token, 0 ) );
70 + wxS(
"issue24360/issue24360.kicad_sch" );
72 checkRootSheetName( schPath,
true,
_(
"Root" ) );
81 + wxS(
"issue24360_project/issue24360_project.kicad_sch" );
83 checkRootSheetName( schPath,
false,
84 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")