From f9b2c34a551d461d065bf868e218f3df560be93f Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Thu, 13 Oct 2022 20:08:42 +0100 Subject: regression-cxx.cpp: fix test by explicitly setting errno When embedded timezone data is not enabled errors from previous tests set icalerrno to non-default and cause exception handling to throw wrong exception: not ok 1186 - Testing exception handling # test failed: "" # at: /build/libical/src/test/regression-cxx.cpp:170 # got: 0 # expected: 1 The change explicitly drops icalerrno to isolate the test result from other tests. --- src/test/regression-cxx.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/test/regression-cxx.cpp b/src/test/regression-cxx.cpp index 6bb33b3a..2fbe3ae6 100644 --- a/src/test/regression-cxx.cpp +++ b/src/test/regression-cxx.cpp @@ -167,6 +167,7 @@ void test_cxx(void) int caughtException = 0; try { + icalerrno = ICAL_NO_ERROR; VComponent v = VComponent(string("HFHFHFHF")); } catch (icalerrorenum err) { if (err == ICAL_BADARG_ERROR) { -- cgit v1.2.1