Remove code restoring errno in StringTestCase::Format()

There doesn't seem to be any need to do this, so don't.
This commit is contained in:
Vadim Zeitlin 2023-01-07 16:50:28 +01:00
parent ed897d9641
commit 20489626e8

View file

@ -172,16 +172,10 @@ void StringTestCase::Format()
CPPUNIT_ASSERT_EQUAL( len, wxString::Format(wxT("%s"), s.c_str()).length());
}
int errnoWas = errno;
// wxString::Format() should not modify errno
errno = 1234;
wxString::Format("abc %d %d", 1, 1);
CPPUNIT_ASSERT_EQUAL
(
1234,
errno
);
errno = errnoWas;
CPPUNIT_ASSERT_EQUAL(1234, errno);
// Positional parameters tests:
CPPUNIT_ASSERT_EQUAL