]> git.saurik.com Git - wxWidgets.git/blobdiff - tests/benchmarks/strings.cpp
Fix crash in wxMSW wxProgressDialog without wxPD_APP_MODAL style.
[wxWidgets.git] / tests / benchmarks / strings.cpp
index 9449f49110065268b08dda3264e22f8026143cbe..22ab5b55a56f52e5c2af343bf398a781dbf92b6f 100644 (file)
@@ -5,7 +5,7 @@
 // Created:     2008-07-19
 // RCS-ID:      $Id$
 // Copyright:   (c) 2008 Vadim Zeitlin <vadim@wxwidgets.org>
-// Licence:     wxWindows license
+// Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
 #include "wx/string.h"
@@ -281,6 +281,18 @@ BENCHMARK_FUNC(ReplaceAll)
     return str.Replace("x", "y") != 0;
 }
 
+BENCHMARK_FUNC(ReplaceLonger)
+{
+    wxString str('x', ASCIISTR_LEN);
+    return str.Replace("x", "yy") != 0;
+}
+
+BENCHMARK_FUNC(ReplaceShorter)
+{
+    wxString str('x', ASCIISTR_LEN);
+    return str.Replace("xx", "y") != 0;
+}
+
 
 // ----------------------------------------------------------------------------
 // string buffers: wx[W]CharBuffer