30 entry.
label = aPath.AfterLast(
'/' );
31 entry.
status = wxT(
"Modified" );
45 makeEntry( wxT(
"Changes" ), wxT(
"proj/a.kicad_pcb" ),
true ),
46 makeEntry( wxT(
"Shared libraries" ), wxT(
"libs/x.kicad_sym" ),
true ),
47 makeEntry( wxT(
"Changes" ), wxT(
"proj/b.kicad_sch" ),
true ),
50 BOOST_REQUIRE_EQUAL( data.
Sections().size(), 2 );
54 const std::vector<FILE_CHECKLIST_ENTRY>& changes = data.
Rows( wxT(
"Changes" ) );
55 BOOST_REQUIRE_EQUAL( changes.size(), 2 );
65 makeEntry( wxT(
"Changes" ), wxT(
"a" ),
true ),
66 makeEntry( wxT(
"Changes" ), wxT(
"b" ),
false ),
67 makeEntry( wxT(
"Changes" ), wxT(
"c" ),
true ),
71 BOOST_REQUIRE_EQUAL( checked.size(), 2 );
79 BOOST_REQUIRE_EQUAL( checked.size(), 2 );
91 makeEntry( wxT(
"G" ), wxT(
"a" ),
true ),
92 makeEntry( wxT(
"G" ), wxT(
"b" ),
true ),
109 makeEntry( wxT(
"G" ), wxT(
"a" ),
false ),
110 makeEntry( wxT(
"G" ), wxT(
"b" ),
false ),
111 makeEntry( wxT(
"H" ), wxT(
"c" ),
false ),
120 BOOST_REQUIRE_EQUAL( checked.size(), 2 );
130 BOOST_CHECK( data.
Rows( wxT(
"missing" ) ).
empty() );
The rows and tick states behind FILE_CHECKLIST_CTRL.
const std::vector< wxString > & Sections() const
Section headings in the order they were added.
std::vector< wxString > CheckedPaths() const
Paths of every ticked row, in the order they were added.
void SetEntries(const std::vector< FILE_CHECKLIST_ENTRY > &aEntries)
void SetSectionChecked(const wxString &aSection, bool aChecked)
void SetChecked(const wxString &aPath, bool aChecked)
bool IsSectionChecked(const wxString &aSection) const
True when the section has rows and every one of them is ticked.
const std::vector< FILE_CHECKLIST_ENTRY > & Rows(const wxString &aSection) const
Rows under a section, in the order they were added. Empty for an unknown section.
static bool empty(const wxTextEntryBase *aCtrl)
One file row in a FILE_CHECKLIST_CTRL.
wxString label
Shown in place of the path.
wxString path
Row identity.
wxString status
Free text, e.g. "Modified".
BOOST_AUTO_TEST_CASE(HorizontalAlignment)
BOOST_AUTO_TEST_SUITE(CadstarPartParser)
BOOST_AUTO_TEST_CASE(SectionsAndRowsKeepInsertionOrder)
static FILE_CHECKLIST_ENTRY makeEntry(const wxString &aSection, const wxString &aPath, bool aChecked)
BOOST_AUTO_TEST_SUITE_END()
BOOST_CHECK_EQUAL(result, "25.4")