Fix search in wxSortedArrayString with custom compare function

This commit is contained in:
Pavel Tyunin 2021-02-25 21:23:33 +02:00
parent 752ba82041
commit 2451f8085b
No known key found for this signature in database
GPG key ID: EDFD0FC013D891EC
3 changed files with 35 additions and 43 deletions

View file

@ -399,6 +399,11 @@ void ArraysTestCase::SortedArray()
ad.Add("Aa");
CPPUNIT_ASSERT_EQUAL( "a", ad[0] );
CPPUNIT_ASSERT_EQUAL( "Aa", ad[1] );
CPPUNIT_ASSERT_EQUAL( 0, ad.Index("a") );
CPPUNIT_ASSERT_EQUAL( 1, ad.Index("Aa") );
CPPUNIT_ASSERT_EQUAL( 2, ad.Index("AB") );
CPPUNIT_ASSERT_EQUAL( wxNOT_FOUND, ad.Index("A") );
CPPUNIT_ASSERT_EQUAL( wxNOT_FOUND, ad.Index("z") );
}
void ArraysTestCase::wxStringArraySplitTest()