From 20489626e83705908a7a83a10d4d03ab284d2a6b Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 7 Jan 2023 16:50:28 +0100 Subject: [PATCH] Remove code restoring errno in StringTestCase::Format() There doesn't seem to be any need to do this, so don't. --- tests/strings/strings.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/tests/strings/strings.cpp b/tests/strings/strings.cpp index b751de07f7..84569f043f 100644 --- a/tests/strings/strings.cpp +++ b/tests/strings/strings.cpp @@ -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