From e7f2eb8f830d90cea7c77ce937888c1673356ca4 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 2 Mar 2014 18:06:47 +0000 Subject: [PATCH] Fix harmless signed/unsigned comparison warning in a test. Don't compare int with unsigned to avoid warnings that were introduced by the changes of r75940. See #15980. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76058 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- tests/controls/textctrltest.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/tests/controls/textctrltest.cpp b/tests/controls/textctrltest.cpp index a527aba580..eb75947272 100644 --- a/tests/controls/textctrltest.cpp +++ b/tests/controls/textctrltest.cpp @@ -528,24 +528,27 @@ void TextCtrlTestCase::LongText() delete m_text; CreateText(wxTE_MULTILINE|wxTE_DONTWRAP); + const int numLines = 1000; + const int lenPattern = 100; + int i; + // Pattern for the line. - wxChar linePattern[100+1]; - for (int i = 0; i < WXSIZEOF(linePattern) - 1; i++) + wxChar linePattern[lenPattern+1]; + for (i = 0; i < lenPattern - 1; i++) { linePattern[i] = wxChar('0' + i % 10); } linePattern[WXSIZEOF(linePattern) - 1] = wxChar('\0'); // Fill the control. - const int numLines = 1000; m_text->SetMaxLength(15000); - for (int i = 0; i < numLines; i++) + for (i = 0; i < numLines; i++) { m_text->AppendText(wxString::Format(wxT("[%3d] %s\n"), i, linePattern)); } // Check the content. - for (int i = 0; i < numLines; i++) + for (i = 0; i < numLines; i++) { wxString pattern = wxString::Format(wxT("[%3d] %s"), i, linePattern); wxString line = m_text->GetLineText(i);