diff --git a/cfg/wxwidgets.cfg b/cfg/wxwidgets.cfg
index b4b2bf329..290998e3c 100644
--- a/cfg/wxwidgets.cfg
+++ b/cfg/wxwidgets.cfg
@@ -4457,6 +4457,62 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/test/cfg/wxwidgets.cpp b/test/cfg/wxwidgets.cpp
index 763cc5133..754d455bf 100644
--- a/test/cfg/wxwidgets.cpp
+++ b/test/cfg/wxwidgets.cpp
@@ -22,6 +22,7 @@
#include
#include
#include
+#include
void validCode()
{
@@ -277,3 +278,37 @@ void deprecatedFunctions(wxApp &a,
calenderCtrl.EnableYearChange(/*default=yes*/);
#endif
}
+
+void wxString_test1(wxString s)
+{
+ for (int i = 0; i <= s.size(); ++i) {
+ // cppcheck-suppress stlOutOfBounds
+ s[i] = 'x';
+ }
+}
+
+void wxString_test2()
+{
+ wxString s;
+ // cppcheck-suppress containerOutOfBounds
+ s[1] = 'a';
+ s.append("abc");
+ s[1] = 'B';
+ printf("%s", static_cast(s.c_str()));
+ wxPrintf("%s", s);
+ wxPrintf("%s", s.c_str());
+ s.Clear();
+}
+
+wxString::iterator wxString_test3()
+{
+ wxString wxString1;
+ wxString wxString2;
+ // cppcheck-suppress iterators2
+ for (wxString::iterator it = wxString1.begin(); it != wxString2.end(); ++it)
+ {}
+
+ wxString::iterator it = wxString1.begin();
+ // cppcheck-suppress returnDanglingLifetime
+ return it;
+}