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:
parent
2d665338e9
commit
09c22b080e
1 changed files with 9 additions and 0 deletions
|
|
@ -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));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue