summaryrefslogtreecommitdiff
path: root/src/test
Commit message (Collapse)AuthorAgeFilesLines
* Internally represent GEO properties as textAllen Winter2022-06-111-0/+45
| | | | | | This allows arbitrary precision for the GEO values fixes: #531
* consider libical-glib as stable nowAllen Winter2022-06-061-2/+0
| | | | fixes: #574
* REUSE complianceAllen Winter2022-06-0637-340/+76
| | | | fixes: #489
* Use `icalctime`, `icalmktime`, `icallocaltime_r` instead of `ctime`, etc.Markus Minichmayr2022-06-035-22/+22
|
* time_t - replace type `time_t` and related functions with our own ↵Markus Minichmayr2022-06-037-28/+28
| | | | `icaltime_t`, etc. and define it centrally in `config_public.h.cmake` and `config.h.cmake`. This allows for easy replacement, should the system-defined time_t not be suitable. This might especially be the case on 32-bit systems where the range of time_t ends 2038.
* CMake files - cmake-lintingAllen Winter2022-06-011-5/+8
|
* buildsystem - fix more uninitialized cmake variablesAllen Winter2022-03-051-1/+3
|
* buildsystem - fix all uninitialized cmake warningsAllen Winter2022-03-051-2/+15
|
* fix some minor coding style issues after recent commitsAllen Winter2022-02-262-6/+5
|
* test - check for memory leaks during regression testsMarkus Minichmayr2022-02-251-8/+37
|
* test-malloc - Export functions and access global members only via getters to ↵Markus Minichmayr2022-02-252-7/+17
| | | | allow accessing the same statistics from across multiple modules in case of dynamic linking. Previously the test executables couldn't access the statistics generated withing the libical shared library, because it didn't share the global statistics variable.
* regression-utils - fix inconsistent function signatures of _ok() and related.Markus Minichmayr2022-02-251-3/+3
|
* src/test/test-malloc.c - use liberror_assertAllen Winter2022-02-201-4/+10
| | | | also use the regression ok() in the regular case.
* Fix inconsistencies in use of icalmemory.Markus Minichmayr2022-02-191-1/+1
| | | | | - icalrecur_test: free rrule.rscale using icalmemory, as it was also allocated via icalmemory. - icalmessage: don't use icalmemory_strdup for now
* buildsystem - entire project can be built with memory consistencyAllen Winter2022-02-182-3/+7
| | | | | | Introduce a new CMake option LIBICAL_DEVMODE_MEMORY_CONSISTENCY that allows all the project libraries to be built with the memory consistency functions.
* src/test/test-malloc.c - remove bad cppcheck-suppressAllen Winter2022-02-181-1/+0
|
* minor coding style fixes after latest mergeAllen Winter2022-02-182-205/+199
|
* Tests: Introducing custom memory allocation functions that allow testing for ↵Markus Minichmayr2022-02-155-0/+270
| | | | consistency and robustness of memory management.
* Merge branch '3.0'Allen Winter2022-01-221-0/+22
|\
| * icalcomponent_set_due wasn't removing TZID when the icaltimetype doesn't ↵Kent Sutherland2022-01-221-0/+22
| | | | | | | | have a zone This would result in strings like "DUE;TZID=America/Chicago:20220122" where the TZID wouldn't get removed even though the type is a DATE
* | Replaced malloc, realloc, free and strdup with corresponding icalmemory_* ↵Markus Minichmayr2022-01-221-4/+4
| | | | | | | | functions.
* | Merge branch '3.0'Allen Winter2022-01-201-0/+93
|\ \ | |/
| * icalvalue: Reset non-UTC icaltimetype::zone on setMilan Crha2022-01-191-0/+93
| | | | | | | | | | | | | | | | | | | | | | When setting an icaltimetype value, the passed-in structure can have set a timezone, which is tight to the source component of the passed-in value and which can be made invalid when the source component is freed. As the structure is copied completely even on clone of the component, then the 'zone' pointer can be passed forward in the clones. Related to https://bugzilla.redhat.com/show_bug.cgi?id=2038090
* | regression.c: add invalid VALARM to restriction testKen Murchison2022-01-181-1/+9
| |
* | Merge branch '3.0'Allen Winter2022-01-171-1/+1
|\ \ | |/
| * src/test/regression-component.c - fix compile warningAllen Winter2022-01-161-1/+1
| | | | | | | | implicit conversion from time_t to int
| * icalcomponent_get_duration() — calculate the duration differently for ↵Дилян Палаузов2022-01-151-0/+61
| | | | | | | | | | | | VEVENT and VTODO icalcomponent_get_dtend() — return null-time, unless called on VEVENT, VAVAILABILITY or VFREEBUSY.
* | icalcomponent_get_duration() — calculate the duration differently for ↵Дилян Палаузов2022-01-141-0/+61
| | | | | | | | | | | | VEVENT and VTODO icalcomponent_get_dtend() — return null-time, unless called on VEVENT, VAVAILABILITY or VFREEBUSY.
* | Merge branch '3.0'Allen Winter2021-12-061-0/+46
|\ \ | |/
| * Fix a crash in cleanVObject on invalid valuesMilan Crha2021-12-061-0/+46
| |
| * lots of spelling fixes found by codespellAllen Winter2021-11-281-1/+1
| |
| * icalcomponent.c: handle the case, when DTEND and DURATION are missingДилян Палаузов2021-11-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In icalcomponent_get_dtend(): • when both DTEND and DURATION are missing, set DTEND to DTSTART when the value-type of DTSTART is DATE-TIME, otherwise set DTEND = DTSTART + 1 day, when the value-type of DTSTART is DATE • throw an error, if both DTEND and DURATION are present, as it is done in icalcomponent_get_duration() In icalcomponent_get_duration(): • if DTEND and DURATION are missing and the value-type of DTSTART is DATE-TIME return zero duration; otherwise, if the value-type of DTSTART is DATE, return one day duration • do not throw an error, if DTEND and DURATION are missing In icalcomponent_get_span() account for the fact, that icalcomponent_get_dtend() returns the correct DTEND, based on the value-type of DTSTART, when DTEND is missing. Likewise for icalcomponent_foreach_recurrence(). Adjust test/regression-component.c to assume span.start == span.end, when the event has only DTSTART and its value-type is DATE-TIME.
* | Merge pull request #519 from dilyanpalauzov/no_duration_no_dtendAllen Winter2021-11-201-1/+1
|\ \ | | | | | | icalcomponent.c: handle the case, when DTEND and DURATION are missing
| * | icalcomponent.c: handle the case, when DTEND and DURATION are missingДилян Палаузов2021-11-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In icalcomponent_get_dtend(): • when both DTEND and DURATION are missing, set DTEND to DTSTART when the value-type of DTSTART is DATE-TIME, otherwise set DTEND = DTSTART + 1 day, when the value-type of DTSTART is DATE • throw an error, if both DTEND and DURATION are present, as it is done in icalcomponent_get_duration() In icalcomponent_get_duration(): • if DTEND and DURATION are missing and the value-type of DTSTART is DATE-TIME return zero duration; otherwise, if the value-type of DTSTART is DATE, return one day duration • do not throw an error, if DTEND and DURATION are missing In icalcomponent_get_span() account for the fact, that icalcomponent_get_dtend() returns the correct DTEND, based on the value-type of DTSTART, when DTEND is missing. Likewise for icalcomponent_foreach_recurrence(). Adjust test/regression-component.c to assume span.start == span.end, when the event has only DTSTART and its value-type is DATE-TIME.
* | | Merge branch '3.0'Allen Winter2021-11-072-17/+13
|\ \ \ | |/ / |/| / | |/
| * Copy in and Use the Kitware FindICU.cmake from CMake 3.21Allen Winter2021-11-071-5/+2
| | | | | | | | | | | | | | | | | | Rather than increase the CMake version requirement to 3.7, in order to upgrade from our less-than-perfect home-grown FindICU we copy in the official CMake version and use that. This seems to fix static linking problems with ICU on Windows. It may also fix static linking on other platforms.
| * Merge pull request #515 from mcrha/3.0Allen Winter2021-11-071-4/+0
| |\ | | | | | | libical-glib: Simplify memory management around ICalCompIter
| | * libical-glib: Simplify memory management around ICalCompIterMilan Crha2021-11-041-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, before this change, the components returned from the ICalCompIter structures did not hold the reference to the parent component, thus the parent component could be freed before the returned instance, effectively destroying the internal libical native structure. There was required to set the owner manually before, but it breaks abstraction and is easy to forget. This change makes all these things transparent. The old code does not need to be changed, because it should set the same owner anyway, thus the call results in no change on the ownership of the returned components.
| * | src/test/regression.c - fix some conversion warningsAllen Winter2021-11-071-13/+13
| |/ | | | | | | conversion from size_t to unsigned long
| * libicalvcal: Cast EOF to 'char' to ensure matching its value against itMilan Crha2021-09-181-0/+85
| | | | | | | | | | | | Some arches (like aarch64, ppc64le and s390x) may not match the EOF constant against its value cast to 'char'. That breaks the parser and can cause an indefinite read of the content, with growing memory use.
| * test: Free VObject in the test_vcal() regression testMilan Crha2021-09-181-0/+2
| | | | | | | | To avoid memory leak.
| * Fix icalrecur_iterator_set_start() for hourly, minutely, and secondly ↵Ken Murchison2021-04-182-0/+10
| | | | | | | | recurrences
* | libicalvcal: Cast EOF to 'char' to ensure matching its value against itMilan Crha2021-09-191-0/+85
| | | | | | | | | | | | Some arches (like aarch64, ppc64le and s390x) may not match the EOF constant against its value cast to 'char'. That breaks the parser and can cause an indefinite read of the content, with growing memory use.
* | test: Free VObject in the test_vcal() regression testMilan Crha2021-09-191-0/+2
| | | | | | | | To avoid memory leak.
* | Fix typos and misspellings found by CodeSpell 2.1.0.Shaun Case2021-07-122-2/+2
| | | | | | | | Fix a few Python whitespace errors found by Syntastic.
* | Fix icalrecur_iterator_set_start() for hourly, minutely, and secondly ↵Ken Murchison2021-04-182-0/+11
| | | | | | | | recurrences
* | Merge branch '3.0'Allen Winter2021-04-172-1/+4
|\ \ | |/
| * src/test/icalrecur_test.c - fix for loop initial declarationAllen Winter2021-04-171-1/+2
| | | | | | | | we don't require C99 mode. found on travis
| * src/test/stow.c - return in main to avoid -Werror=return-typeAllen Winter2021-04-171-0/+2
| | | | | | | | makes travis happy
| * src/test/timezones.c - reduce max error rate on Mac back to 1%Allen Winter2021-04-111-4/+0
| | | | | | | | current testing shows we no longer need the higher threshold