Add wxDictionaryStringSortAscending comparison function.
Add "dictionary sort" callbacks and document them and the already existing wxStringSortAscending() and wxStringSortDescending(). See #16330. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76753 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -358,6 +358,20 @@ void ArraysTestCase::SortedArray()
|
||||
a.push_back("b");
|
||||
a.push_back("a");
|
||||
CPPUNIT_ASSERT_EQUAL( 0, a.Index("a") );
|
||||
|
||||
|
||||
wxSortedArrayString ar(wxStringSortDescending);
|
||||
ar.Add("a");
|
||||
ar.Add("b");
|
||||
CPPUNIT_ASSERT_EQUAL( "b", ar[0] );
|
||||
CPPUNIT_ASSERT_EQUAL( "a", ar[1] );
|
||||
|
||||
wxSortedArrayString ad(wxDictionaryStringSortAscending);
|
||||
ad.Add("AB");
|
||||
ad.Add("a");
|
||||
ad.Add("Aa");
|
||||
CPPUNIT_ASSERT_EQUAL( "a", ad[0] );
|
||||
CPPUNIT_ASSERT_EQUAL( "Aa", ad[1] );
|
||||
}
|
||||
|
||||
void ArraysTestCase::wxStringArraySplitTest()
|
||||
|
Reference in New Issue
Block a user