mirror of
https://github.com/wxWidgets/wxWidgets.git
synced 2026-08-17 00:47:34 +08:00
Fix listboxtest test failing under wxQt
Qt uses QString::localeAwareCompare() for comparison and this is what their
documentation says: "On other Unix-like systems without ICU, the comparison
falls back to the system library's strcoll()". Under MSW, Qt uses CompareStringEx()
IOW, Qt always compares strings by locale-specific sorting criteria and BTW
this is what wxGTK was like before this commit 625ed74 (Make sorting of wxListBox,
wxChoice and wxComboBox identical to the MSW sorting)
This commit is contained in:
@@ -109,12 +109,21 @@ void ListBoxTestCase::Sort()
|
||||
|
||||
m_list->Append(testitems);
|
||||
|
||||
#ifndef __WXQT__
|
||||
CPPUNIT_ASSERT_EQUAL("AAA", m_list->GetString(0));
|
||||
CPPUNIT_ASSERT_EQUAL("Aaa", m_list->GetString(1));
|
||||
CPPUNIT_ASSERT_EQUAL("aaa", m_list->GetString(2));
|
||||
CPPUNIT_ASSERT_EQUAL("aaab", m_list->GetString(3));
|
||||
CPPUNIT_ASSERT_EQUAL("aab", m_list->GetString(4));
|
||||
CPPUNIT_ASSERT_EQUAL("aba", m_list->GetString(5));
|
||||
#else
|
||||
CPPUNIT_ASSERT_EQUAL("aaa", m_list->GetString(0));
|
||||
CPPUNIT_ASSERT_EQUAL("Aaa", m_list->GetString(1));
|
||||
CPPUNIT_ASSERT_EQUAL("AAA", m_list->GetString(2));
|
||||
CPPUNIT_ASSERT_EQUAL("aaab", m_list->GetString(3));
|
||||
CPPUNIT_ASSERT_EQUAL("aab", m_list->GetString(4));
|
||||
CPPUNIT_ASSERT_EQUAL("aba", m_list->GetString(5));
|
||||
#endif
|
||||
|
||||
m_list->Append("a", wxUIntToPtr(1));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user