1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: tests/controls/gridtest.cpp
3 // Purpose: wxGrid unit test
4 // Author: Steven Lamerton
7 // Copyright: (c) 2010 Steven Lamerton
8 ///////////////////////////////////////////////////////////////////////////////
23 #include "testableframe.h"
24 #include "asserthelper.h"
25 #include "wx/uiaction.h"
27 class GridTestCase
: public CppUnit::TestCase
33 virtual void tearDown();
36 CPPUNIT_TEST_SUITE( GridTestCase
);
37 WXUISIM_TEST( CellEdit
);
38 WXUISIM_TEST( CellClick
);
39 WXUISIM_TEST( CellSelect
);
40 WXUISIM_TEST( LabelClick
);
41 WXUISIM_TEST( SortClick
);
43 WXUISIM_TEST( RangeSelect
);
44 CPPUNIT_TEST( Cursor
);
45 CPPUNIT_TEST( Selection
);
46 CPPUNIT_TEST( AddRowCol
);
47 CPPUNIT_TEST( ColumnOrder
);
48 CPPUNIT_TEST( LineFormatting
);
49 CPPUNIT_TEST( SortSupport
);
50 CPPUNIT_TEST( Labels
);
51 CPPUNIT_TEST( SelectionMode
);
52 CPPUNIT_TEST( CellFormatting
);
53 WXUISIM_TEST( Editable
);
54 WXUISIM_TEST( ReadOnly
);
55 CPPUNIT_TEST( PseudoTest_NativeHeader
);
56 WXUISIM_TEST( LabelClick
);
57 WXUISIM_TEST( SortClick
);
58 CPPUNIT_TEST( ColumnOrder
);
59 CPPUNIT_TEST( PseudoTest_NativeLabels
);
60 WXUISIM_TEST( LabelClick
);
61 WXUISIM_TEST( SortClick
);
62 CPPUNIT_TEST( ColumnOrder
);
63 CPPUNIT_TEST_SUITE_END();
76 void LineFormatting();
80 void CellFormatting();
83 void PseudoTest_NativeHeader() { ms_nativeheader
= true; }
84 void PseudoTest_NativeLabels() { ms_nativeheader
= false;
85 ms_nativelabels
= true; }
87 static bool ms_nativeheader
;
88 static bool ms_nativelabels
;
92 DECLARE_NO_COPY_CLASS(GridTestCase
)
95 // register in the unnamed registry so that these tests are run by default
96 CPPUNIT_TEST_SUITE_REGISTRATION( GridTestCase
);
98 // also include in its own registry so that these tests can be run alone
99 CPPUNIT_TEST_SUITE_NAMED_REGISTRATION( GridTestCase
, "GridTestCase" );
101 //initialise the static variable
102 bool GridTestCase::ms_nativeheader
= false;
103 bool GridTestCase::ms_nativelabels
= false;
105 void GridTestCase::setUp()
107 m_grid
= new wxGrid(wxTheApp
->GetTopWindow(), wxID_ANY
);
108 m_grid
->CreateGrid(10, 2);
109 m_grid
->SetSize(400, 200);
111 if( ms_nativeheader
)
112 m_grid
->UseNativeColHeader();
114 if( ms_nativelabels
)
115 m_grid
->SetUseNativeColLabels();
121 void GridTestCase::tearDown()
123 // This is just a hack to continue the rest of the tests to run: if we
124 // destroy the header control while it has capture, this results in an
125 // assert failure and while handling an exception from it more bad things
126 // happen (as it's thrown from a dtor), resulting in simply aborting
127 // everything. So ensure that it doesn't have capture in any case.
129 // Of course, the right thing to do would be to understand why does it
130 // still have capture when the grid is destroyed sometimes.
131 wxWindow
* const win
= wxWindow::GetCapture();
138 void GridTestCase::CellEdit()
140 #if wxUSE_UIACTIONSIMULATOR
141 EventCounter
changing(m_grid
, wxEVT_GRID_CELL_CHANGING
);
142 EventCounter
changed(m_grid
, wxEVT_GRID_CELL_CHANGED
);
143 EventCounter
created(m_grid
, wxEVT_GRID_EDITOR_CREATED
);
145 wxUIActionSimulator sim
;
148 m_grid
->SetGridCursor(1, 1);
149 m_grid
->ShowCellEditControl();
152 sim
.Char(WXK_RETURN
);
156 CPPUNIT_ASSERT_EQUAL(1, created
.GetCount());
157 CPPUNIT_ASSERT_EQUAL(1, changing
.GetCount());
158 CPPUNIT_ASSERT_EQUAL(1, changed
.GetCount());
162 void GridTestCase::CellClick()
164 #if wxUSE_UIACTIONSIMULATOR
165 EventCounter
lclick(m_grid
, wxEVT_GRID_CELL_LEFT_CLICK
);
166 EventCounter
ldclick(m_grid
, wxEVT_GRID_CELL_LEFT_DCLICK
);
167 EventCounter
rclick(m_grid
, wxEVT_GRID_CELL_RIGHT_CLICK
);
168 EventCounter
rdclick(m_grid
, wxEVT_GRID_CELL_RIGHT_DCLICK
);
171 wxUIActionSimulator sim
;
173 wxRect rect
= m_grid
->CellToRect(0, 0);
174 wxPoint point
= m_grid
->CalcScrolledPosition(rect
.GetPosition());
175 point
= m_grid
->ClientToScreen(point
+ wxPoint(m_grid
->GetRowLabelSize(),
176 m_grid
->GetColLabelSize())
179 sim
.MouseMove(point
);
185 CPPUNIT_ASSERT_EQUAL(1, lclick
.GetCount());
191 //A double click event sends a single click event first
192 //test to ensure this still happens in the future
193 CPPUNIT_ASSERT_EQUAL(1, lclick
.GetCount());
194 CPPUNIT_ASSERT_EQUAL(1, ldclick
.GetCount());
196 sim
.MouseClick(wxMOUSE_BTN_RIGHT
);
199 CPPUNIT_ASSERT_EQUAL(1, rclick
.GetCount());
202 sim
.MouseDblClick(wxMOUSE_BTN_RIGHT
);
205 CPPUNIT_ASSERT_EQUAL(1, rclick
.GetCount());
206 CPPUNIT_ASSERT_EQUAL(1, rdclick
.GetCount());
210 void GridTestCase::CellSelect()
212 #if wxUSE_UIACTIONSIMULATOR
213 EventCounter
cell(m_grid
, wxEVT_GRID_SELECT_CELL
);
215 wxUIActionSimulator sim
;
217 wxRect rect
= m_grid
->CellToRect(0, 0);
218 wxPoint point
= m_grid
->CalcScrolledPosition(rect
.GetPosition());
219 point
= m_grid
->ClientToScreen(point
+ wxPoint(m_grid
->GetRowLabelSize(),
220 m_grid
->GetColLabelSize())
223 sim
.MouseMove(point
);
229 CPPUNIT_ASSERT_EQUAL(1, cell
.GetCount());
233 m_grid
->SetGridCursor(1, 1);
234 m_grid
->GoToCell(1, 0);
236 sim
.MouseMove(point
);
242 CPPUNIT_ASSERT_EQUAL(3, cell
.GetCount());
246 void GridTestCase::LabelClick()
248 #if wxUSE_UIACTIONSIMULATOR
249 EventCounter
lclick(m_grid
, wxEVT_GRID_LABEL_LEFT_CLICK
);
250 EventCounter
ldclick(m_grid
, wxEVT_GRID_LABEL_LEFT_DCLICK
);
251 EventCounter
rclick(m_grid
, wxEVT_GRID_LABEL_RIGHT_CLICK
);
252 EventCounter
rdclick(m_grid
, wxEVT_GRID_LABEL_RIGHT_DCLICK
);
254 wxUIActionSimulator sim
;
256 wxPoint
pos(m_grid
->GetRowLabelSize() + 2, 2);
257 pos
= m_grid
->ClientToScreen(pos
);
265 CPPUNIT_ASSERT_EQUAL(1, lclick
.GetCount());
270 CPPUNIT_ASSERT_EQUAL(1, ldclick
.GetCount());
272 sim
.MouseClick(wxMOUSE_BTN_RIGHT
);
275 CPPUNIT_ASSERT_EQUAL(1, rclick
.GetCount());
278 sim
.MouseDblClick(wxMOUSE_BTN_RIGHT
);
281 if( ms_nativeheader
)
283 //Right double click not supported with native headers so we get two
285 CPPUNIT_ASSERT_EQUAL(2, rclick
.GetCount());
289 CPPUNIT_ASSERT_EQUAL(1, rclick
.GetCount());
290 CPPUNIT_ASSERT_EQUAL(1, rdclick
.GetCount());
295 void GridTestCase::SortClick()
297 #if wxUSE_UIACTIONSIMULATOR
298 m_grid
->SetSortingColumn(0);
300 EventCounter
sort(m_grid
, wxEVT_GRID_COL_SORT
);
302 wxUIActionSimulator sim
;
304 wxPoint
pos(m_grid
->GetRowLabelSize() + 4, 4);
305 pos
= m_grid
->ClientToScreen(pos
);
313 CPPUNIT_ASSERT_EQUAL(1, sort
.GetCount());
317 void GridTestCase::Size()
319 #if wxUSE_UIACTIONSIMULATOR && !defined(__WXGTK__)
320 EventCounter
colsize(m_grid
, wxEVT_GRID_COL_SIZE
);
321 EventCounter
rowsize(m_grid
, wxEVT_GRID_ROW_SIZE
);
323 wxUIActionSimulator sim
;
325 wxPoint pt
= m_grid
->ClientToScreen(wxPoint(m_grid
->GetRowLabelSize() +
326 m_grid
->GetColSize(0), 5));
334 sim
.MouseMove(pt
.x
+ 50, pt
.y
);
340 CPPUNIT_ASSERT_EQUAL(1, colsize
.GetCount());
342 pt
= m_grid
->ClientToScreen(wxPoint(5, m_grid
->GetColLabelSize() +
343 m_grid
->GetRowSize(0)));
345 sim
.MouseDragDrop(pt
.x
, pt
.y
, pt
.x
, pt
.y
+ 50);
348 CPPUNIT_ASSERT_EQUAL(1, rowsize
.GetCount());
352 void GridTestCase::RangeSelect()
354 #if wxUSE_UIACTIONSIMULATOR
355 EventCounter
select(m_grid
, wxEVT_GRID_RANGE_SELECT
);
357 wxUIActionSimulator sim
;
359 //We add the extra 10 to ensure that we are inside the cell
360 wxPoint pt
= m_grid
->ClientToScreen(wxPoint(m_grid
->GetRowLabelSize() + 10,
361 m_grid
->GetColLabelSize() + 10)
370 sim
.MouseMove(pt
.x
+ 50, pt
.y
+ 50);
376 CPPUNIT_ASSERT_EQUAL(1, select
.GetCount());
380 void GridTestCase::Cursor()
382 m_grid
->SetGridCursor(1, 1);
384 CPPUNIT_ASSERT_EQUAL(1, m_grid
->GetGridCursorCol());
385 CPPUNIT_ASSERT_EQUAL(1, m_grid
->GetGridCursorRow());
387 m_grid
->MoveCursorDown(false);
388 m_grid
->MoveCursorLeft(false);
389 m_grid
->MoveCursorUp(false);
390 m_grid
->MoveCursorUp(false);
391 m_grid
->MoveCursorRight(false);
393 CPPUNIT_ASSERT_EQUAL(1, m_grid
->GetGridCursorCol());
394 CPPUNIT_ASSERT_EQUAL(0, m_grid
->GetGridCursorRow());
396 m_grid
->SetCellValue(0, 0, "some text");
397 m_grid
->SetCellValue(3, 0, "other text");
398 m_grid
->SetCellValue(0, 1, "more text");
399 m_grid
->SetCellValue(3, 1, "extra text");
404 m_grid
->MoveCursorLeftBlock(false);
406 CPPUNIT_ASSERT_EQUAL(0, m_grid
->GetGridCursorCol());
407 CPPUNIT_ASSERT_EQUAL(0, m_grid
->GetGridCursorRow());
409 m_grid
->MoveCursorDownBlock(false);
411 CPPUNIT_ASSERT_EQUAL(0, m_grid
->GetGridCursorCol());
412 CPPUNIT_ASSERT_EQUAL(3, m_grid
->GetGridCursorRow());
414 m_grid
->MoveCursorRightBlock(false);
416 CPPUNIT_ASSERT_EQUAL(1, m_grid
->GetGridCursorCol());
417 CPPUNIT_ASSERT_EQUAL(3, m_grid
->GetGridCursorRow());
419 m_grid
->MoveCursorUpBlock(false);
421 CPPUNIT_ASSERT_EQUAL(1, m_grid
->GetGridCursorCol());
422 CPPUNIT_ASSERT_EQUAL(0, m_grid
->GetGridCursorRow());
425 void GridTestCase::Selection()
429 CPPUNIT_ASSERT(m_grid
->IsSelection());
430 CPPUNIT_ASSERT(m_grid
->IsInSelection(0, 0));
431 CPPUNIT_ASSERT(m_grid
->IsInSelection(9, 1));
433 m_grid
->SelectBlock(1, 0, 3, 1);
435 wxGridCellCoordsArray topleft
= m_grid
->GetSelectionBlockTopLeft();
436 wxGridCellCoordsArray bottomright
= m_grid
->GetSelectionBlockBottomRight();
438 CPPUNIT_ASSERT_EQUAL(1, topleft
.Count());
439 CPPUNIT_ASSERT_EQUAL(1, bottomright
.Count());
441 CPPUNIT_ASSERT_EQUAL(0, topleft
.Item(0).GetCol());
442 CPPUNIT_ASSERT_EQUAL(1, topleft
.Item(0).GetRow());
443 CPPUNIT_ASSERT_EQUAL(1, bottomright
.Item(0).GetCol());
444 CPPUNIT_ASSERT_EQUAL(3, bottomright
.Item(0).GetRow());
446 m_grid
->SelectCol(1);
448 CPPUNIT_ASSERT(m_grid
->IsInSelection(0, 1));
449 CPPUNIT_ASSERT(m_grid
->IsInSelection(9, 1));
450 CPPUNIT_ASSERT(!m_grid
->IsInSelection(3, 0));
452 m_grid
->SelectRow(4);
454 CPPUNIT_ASSERT(m_grid
->IsInSelection(4, 0));
455 CPPUNIT_ASSERT(m_grid
->IsInSelection(4, 1));
456 CPPUNIT_ASSERT(!m_grid
->IsInSelection(3, 0));
459 void GridTestCase::AddRowCol()
461 CPPUNIT_ASSERT_EQUAL(10, m_grid
->GetNumberRows());
462 CPPUNIT_ASSERT_EQUAL(2, m_grid
->GetNumberCols());
464 m_grid
->AppendCols();
465 m_grid
->AppendRows();
467 CPPUNIT_ASSERT_EQUAL(11, m_grid
->GetNumberRows());
468 CPPUNIT_ASSERT_EQUAL(3, m_grid
->GetNumberCols());
470 m_grid
->AppendCols(2);
471 m_grid
->AppendRows(2);
473 CPPUNIT_ASSERT_EQUAL(13, m_grid
->GetNumberRows());
474 CPPUNIT_ASSERT_EQUAL(5, m_grid
->GetNumberCols());
476 m_grid
->InsertCols(1, 2);
477 m_grid
->InsertRows(2, 3);
479 CPPUNIT_ASSERT_EQUAL(16, m_grid
->GetNumberRows());
480 CPPUNIT_ASSERT_EQUAL(7, m_grid
->GetNumberCols());
483 void GridTestCase::ColumnOrder()
485 m_grid
->AppendCols(2);
487 CPPUNIT_ASSERT_EQUAL(4, m_grid
->GetNumberCols());
490 neworder
.push_back(1);
491 neworder
.push_back(3);
492 neworder
.push_back(2);
493 neworder
.push_back(0);
495 m_grid
->SetColumnsOrder(neworder
);
497 CPPUNIT_ASSERT_EQUAL(0, m_grid
->GetColPos(1));
498 CPPUNIT_ASSERT_EQUAL(1, m_grid
->GetColPos(3));
499 CPPUNIT_ASSERT_EQUAL(2, m_grid
->GetColPos(2));
500 CPPUNIT_ASSERT_EQUAL(3, m_grid
->GetColPos(0));
502 CPPUNIT_ASSERT_EQUAL(1, m_grid
->GetColAt(0));
503 CPPUNIT_ASSERT_EQUAL(3, m_grid
->GetColAt(1));
504 CPPUNIT_ASSERT_EQUAL(2, m_grid
->GetColAt(2));
505 CPPUNIT_ASSERT_EQUAL(0, m_grid
->GetColAt(3));
507 m_grid
->ResetColPos();
509 CPPUNIT_ASSERT_EQUAL(0, m_grid
->GetColPos(0));
510 CPPUNIT_ASSERT_EQUAL(1, m_grid
->GetColPos(1));
511 CPPUNIT_ASSERT_EQUAL(2, m_grid
->GetColPos(2));
512 CPPUNIT_ASSERT_EQUAL(3, m_grid
->GetColPos(3));
515 void GridTestCase::LineFormatting()
517 CPPUNIT_ASSERT(m_grid
->GridLinesEnabled());
519 m_grid
->EnableGridLines(false);
521 CPPUNIT_ASSERT(!m_grid
->GridLinesEnabled());
523 m_grid
->EnableGridLines();
525 m_grid
->SetGridLineColour(*wxRED
);
527 CPPUNIT_ASSERT_EQUAL(m_grid
->GetGridLineColour(), *wxRED
);
530 void GridTestCase::SortSupport()
532 CPPUNIT_ASSERT_EQUAL(wxNOT_FOUND
, m_grid
->GetSortingColumn());
534 m_grid
->SetSortingColumn(1);
536 CPPUNIT_ASSERT(!m_grid
->IsSortingBy(0));
537 CPPUNIT_ASSERT(m_grid
->IsSortingBy(1));
538 CPPUNIT_ASSERT(m_grid
->IsSortOrderAscending());
540 m_grid
->SetSortingColumn(0, false);
542 CPPUNIT_ASSERT(m_grid
->IsSortingBy(0));
543 CPPUNIT_ASSERT(!m_grid
->IsSortingBy(1));
544 CPPUNIT_ASSERT(!m_grid
->IsSortOrderAscending());
546 m_grid
->UnsetSortingColumn();
548 CPPUNIT_ASSERT(!m_grid
->IsSortingBy(0));
549 CPPUNIT_ASSERT(!m_grid
->IsSortingBy(1));
552 void GridTestCase::Labels()
554 CPPUNIT_ASSERT_EQUAL("A", m_grid
->GetColLabelValue(0));
555 CPPUNIT_ASSERT_EQUAL("1", m_grid
->GetRowLabelValue(0));
557 m_grid
->SetColLabelValue(0, "Column 1");
558 m_grid
->SetRowLabelValue(0, "Row 1");
560 CPPUNIT_ASSERT_EQUAL("Column 1", m_grid
->GetColLabelValue(0));
561 CPPUNIT_ASSERT_EQUAL("Row 1", m_grid
->GetRowLabelValue(0));
563 m_grid
->SetLabelTextColour(*wxGREEN
);
564 m_grid
->SetLabelBackgroundColour(*wxRED
);
566 CPPUNIT_ASSERT_EQUAL(*wxGREEN
, m_grid
->GetLabelTextColour());
567 CPPUNIT_ASSERT_EQUAL(*wxRED
, m_grid
->GetLabelBackgroundColour());
569 m_grid
->SetColLabelTextOrientation(wxVERTICAL
);
571 CPPUNIT_ASSERT_EQUAL(static_cast<int>(wxVERTICAL
),
572 static_cast<int>(m_grid
->GetColLabelTextOrientation()));
575 void GridTestCase::SelectionMode()
577 //We already test this mode in Select
578 CPPUNIT_ASSERT_EQUAL(wxGrid::wxGridSelectCells
,
579 m_grid
->GetSelectionMode());
581 //Test row selection be selecting a single cell and checking the whole
583 m_grid
->SetSelectionMode(wxGrid::wxGridSelectRows
);
584 m_grid
->SelectBlock(3, 1, 3, 1);
586 wxArrayInt selectedRows
= m_grid
->GetSelectedRows();
587 CPPUNIT_ASSERT_EQUAL(1, selectedRows
.Count());
588 CPPUNIT_ASSERT_EQUAL(3, selectedRows
[0]);
590 CPPUNIT_ASSERT_EQUAL(wxGrid::wxGridSelectRows
,
591 m_grid
->GetSelectionMode());
594 //Test column selection be selecting a single cell and checking the whole
596 m_grid
->SetSelectionMode(wxGrid::wxGridSelectColumns
);
597 m_grid
->SelectBlock(3, 1, 3, 1);
599 wxArrayInt selectedCols
= m_grid
->GetSelectedCols();
600 CPPUNIT_ASSERT_EQUAL(1, selectedCols
.Count());
601 CPPUNIT_ASSERT_EQUAL(1, selectedCols
[0]);
603 CPPUNIT_ASSERT_EQUAL(wxGrid::wxGridSelectColumns
,
604 m_grid
->GetSelectionMode());
607 void GridTestCase::CellFormatting()
609 //Check that initial alignment is default
610 int horiz
, cellhoriz
, vert
, cellvert
;
612 m_grid
->GetDefaultCellAlignment(&horiz
, &vert
);
613 m_grid
->GetCellAlignment(0, 0, &cellhoriz
, &cellvert
);
615 CPPUNIT_ASSERT_EQUAL(cellhoriz
, horiz
);
616 CPPUNIT_ASSERT_EQUAL(cellvert
, vert
);
618 //Check initial text colour and background colour are default
621 back
= m_grid
->GetDefaultCellBackgroundColour();
623 CPPUNIT_ASSERT_EQUAL(back
, m_grid
->GetCellBackgroundColour(0, 0));
625 back
= m_grid
->GetDefaultCellTextColour();
627 CPPUNIT_ASSERT_EQUAL(back
, m_grid
->GetCellTextColour(0, 0));
629 #if WXWIN_COMPATIBILITY_2_8
630 m_grid
->SetCellAlignment(wxALIGN_CENTRE
, 0, 0);
631 m_grid
->GetCellAlignment(0, 0, &cellhoriz
, &cellvert
);
633 CPPUNIT_ASSERT_EQUAL(static_cast<int>(wxALIGN_CENTRE
), cellhoriz
);
634 CPPUNIT_ASSERT_EQUAL(static_cast<int>(wxALIGN_CENTRE
), cellvert
);
635 #endif // WXWIN_COMPATIBILITY_2_8
637 m_grid
->SetCellAlignment(0, 0, wxALIGN_LEFT
, wxALIGN_BOTTOM
);
638 m_grid
->GetCellAlignment(0, 0, &cellhoriz
, &cellvert
);
640 CPPUNIT_ASSERT_EQUAL(static_cast<int>(wxALIGN_LEFT
), cellhoriz
);
641 CPPUNIT_ASSERT_EQUAL(static_cast<int>(wxALIGN_BOTTOM
), cellvert
);
643 #if WXWIN_COMPATIBILITY_2_8
644 m_grid
->SetCellTextColour(*wxRED
, 0, 0);
645 CPPUNIT_ASSERT_EQUAL(*wxRED
, m_grid
->GetCellTextColour(0, 0));
646 #endif // WXWIN_COMPATIBILITY_2_8
648 m_grid
->SetCellTextColour(0, 0, *wxGREEN
);
649 CPPUNIT_ASSERT_EQUAL(*wxGREEN
, m_grid
->GetCellTextColour(0, 0));
652 void GridTestCase::Editable()
654 #if wxUSE_UIACTIONSIMULATOR
655 //As the grid is not editable we shouldn't create an editor
656 EventCounter
created(m_grid
, wxEVT_GRID_EDITOR_CREATED
);
658 wxUIActionSimulator sim
;
660 CPPUNIT_ASSERT(m_grid
->IsEditable());
662 m_grid
->EnableEditing(false);
664 CPPUNIT_ASSERT(!m_grid
->IsEditable());
667 m_grid
->SetGridCursor(1, 1);
668 m_grid
->ShowCellEditControl();
673 sim
.Char(WXK_RETURN
);
676 CPPUNIT_ASSERT_EQUAL(0, created
.GetCount());
680 void GridTestCase::ReadOnly()
682 #if wxUSE_UIACTIONSIMULATOR
683 //As the cell is readonly we shouldn't create an editor
684 EventCounter
created(m_grid
, wxEVT_GRID_EDITOR_CREATED
);
686 wxUIActionSimulator sim
;
688 CPPUNIT_ASSERT(!m_grid
->IsReadOnly(1, 1));
690 m_grid
->SetReadOnly(1, 1);
692 CPPUNIT_ASSERT(m_grid
->IsReadOnly(1, 1));
695 m_grid
->SetGridCursor(1, 1);
697 CPPUNIT_ASSERT(m_grid
->IsCurrentCellReadOnly());
699 m_grid
->ShowCellEditControl();
704 sim
.Char(WXK_RETURN
);
707 CPPUNIT_ASSERT_EQUAL(0, created
.GetCount());