Add unit tests for wxGrid::Deselect{Row,Col}()
These functions got broken by the changes of cdf3187fe5
(Improve rows,
columns and cells deselection in wxGrid, 2020-03-26), but this went
unnoticed because they were not covered by the unit tests, so add the
tests for them to prevent this from happening again in the future.
This commit is contained in:
@@ -565,6 +565,13 @@ TEST_CASE_METHOD(GridTestCase, "Grid::Selection", "[grid]")
|
|||||||
CHECK(m_grid->IsInSelection(4, 0));
|
CHECK(m_grid->IsInSelection(4, 0));
|
||||||
CHECK(m_grid->IsInSelection(4, 1));
|
CHECK(m_grid->IsInSelection(4, 1));
|
||||||
CHECK(!m_grid->IsInSelection(3, 0));
|
CHECK(!m_grid->IsInSelection(3, 0));
|
||||||
|
|
||||||
|
m_grid->DeselectRow(4);
|
||||||
|
CHECK(!m_grid->IsInSelection(4, 0));
|
||||||
|
CHECK(!m_grid->IsInSelection(4, 1));
|
||||||
|
|
||||||
|
m_grid->DeselectCol(1);
|
||||||
|
CHECK(!m_grid->IsInSelection(0, 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_CASE_METHOD(GridTestCase, "Grid::SelectionRange", "[grid]")
|
TEST_CASE_METHOD(GridTestCase, "Grid::SelectionRange", "[grid]")
|
||||||
|
Reference in New Issue
Block a user