diff options
author | Sergei Trofimovich <slyich@gmail.com> | 2022-10-13 20:08:42 +0100 |
---|---|---|
committer | Allen Winter <allen.winter@kdab.com> | 2022-11-05 07:55:10 -0400 |
commit | eb093b65625c347be2720efeea62d99b63d7d84b (patch) | |
tree | ad79441d5319ab44411fa953f59e87077b9794ad | |
parent | d613ee65569d3b8198dd2292047749a416c6bde5 (diff) | |
download | libical-git-eb093b65625c347be2720efeea62d99b63d7d84b.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.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/test/regression-cxx.cpp b/src/test/regression-cxx.cpp index dbe3ae49..b275bcd4 100644 --- a/src/test/regression-cxx.cpp +++ b/src/test/regression-cxx.cpp @@ -159,6 +159,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) { |