wxListBox::HitTest() does work in wxGTK but we need to realize the control
before using it.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65867 
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
 
 void ListBoxTestCase::HitTest()
 {
 
 void ListBoxTestCase::HitTest()
 {
-#if defined(__WXMSW__) || defined(__WXOSX__)
     wxArrayString testitems;
     testitems.Add("item 0");
     testitems.Add("item 1");
     wxArrayString testitems;
     testitems.Add("item 0");
     testitems.Add("item 1");
 
     m_list->Append(testitems);
 
 
     m_list->Append(testitems);
 
-    CPPUNIT_ASSERT(m_list->HitTest(wxPoint(10, 10)) != wxNOT_FOUND);
-    CPPUNIT_ASSERT(m_list->HitTest(10, 10) != wxNOT_FOUND);
-
-    CPPUNIT_ASSERT(m_list->HitTest(wxPoint(290, 190)) == wxNOT_FOUND);
-    CPPUNIT_ASSERT(m_list->HitTest(290, 190) == wxNOT_FOUND);
+#ifdef __WXGTK__
+    // The control needs to be realized for HitTest() to work.
+    wxYield();
+
+    CPPUNIT_ASSERT_EQUAL( 0, m_list->HitTest(5, 5) );
+
+    CPPUNIT_ASSERT_EQUAL( wxNOT_FOUND, m_list->HitTest(290, 190) );