summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Trofimovich <slyich@gmail.com>2022-10-13 20:08:42 +0100
committerAllen Winter <allen.winter@kdab.com>2022-11-05 07:55:24 -0400
commitf9b2c34a551d461d065bf868e218f3df560be93f (patch)
tree59ab6e1b494c0f5ca5ef63042d487ce4d12d0a8b
parent6a95dff36aec7ebd83af47ba74de5d22fe13da9f (diff)
downloadlibical-git-f9b2c34a551d461d065bf868e218f3df560be93f.tar.gz
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.
-rw-r--r--src/test/regression-cxx.cpp1
1 files changed, 1 insertions, 0 deletions
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) {