![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
#include "metadata/notify.h"#include <stdarg.h>#include <stddef.h>#include <setjmp.h>#include <stdint.h>#include <cmocka.h>#include <string.h>#include <glib.h>
Include dependency graph for test_metadata_notify.c:Go to the source code of this file.
Data Structures | |
| struct | _seen_t |
Typedefs | |
| typedef struct _seen_t | _seen_t |
Functions | |
| static void | _record (const dt_metadata_notice_t kind, const char *message) |
| static void | _record_tag_change (void) |
| static int | _setup (void **state) |
| static int | _teardown (void **state) |
| static void | test_no_handler_is_silent (void **state) |
| static void | test_kinds_stay_distinct (void **state) |
| static void | test_handler_can_be_removed (void **state) |
| static void | test_tags_changed_fires_each_time (void **state) |
| static void | test_channels_are_independent (void **state) |
| int | main (void) |
Variables | |
| static _seen_t | _seen |
The inversion that makes src/metadata a closed module: it states what happened, and whoever is running it decides what that looks like.
These tests exist because the no-handler case is the one nothing else exercises – every interactive run installs a handler in dt_init(), so a crash or a swallowed message there would only ever show up under ansel-cli or in a test binary. Which is to say: here.
|
static |
Definition at line 55 of file test_metadata_notify.c.
References _seen, DT_METADATA_NOTICE_TOAST, kind, L, _seen_t::last, _seen_t::messages, and _seen_t::toasts.
Referenced by test_channels_are_independent(), test_handler_can_be_removed(), and test_kinds_stay_distinct().
Definition at line 63 of file test_metadata_notify.c.
References _seen, and _seen_t::tag_changes.
Referenced by test_channels_are_independent(), and test_tags_changed_fires_each_time().
Definition at line 75 of file test_metadata_notify.c.
References _seen, dt_metadata_set_notify_handler(), dt_metadata_set_tags_changed_handler(), L, _seen_t::last, state, and void().
Referenced by main().
| int main | ( | void | ) |
Definition at line 168 of file test_metadata_notify.c.
References _setup(), _teardown(), L, test_channels_are_independent(), test_handler_can_be_removed(), test_kinds_stay_distinct(), test_no_handler_is_silent(), and test_tags_changed_fires_each_time().
Definition at line 151 of file test_metadata_notify.c.
References _record(), _record_tag_change(), _seen, DT_METADATA_NOTICE_TOAST, dt_metadata_notify(), dt_metadata_set_notify_handler(), dt_metadata_set_tags_changed_handler(), dt_metadata_tags_changed(), L, state, _seen_t::tag_changes, _seen_t::toasts, and void().
Referenced by main().
Definition at line 122 of file test_metadata_notify.c.
References _record(), _seen, DT_METADATA_NOTICE_MESSAGE, dt_metadata_notify(), dt_metadata_set_notify_handler(), L, _seen_t::last, _seen_t::messages, state, and void().
Referenced by main().
Definition at line 104 of file test_metadata_notify.c.
References _record(), _seen, DT_METADATA_NOTICE_MESSAGE, DT_METADATA_NOTICE_TOAST, dt_metadata_notify(), dt_metadata_set_notify_handler(), L, _seen_t::last, _seen_t::messages, state, _seen_t::toasts, and void().
Referenced by main().
Definition at line 87 of file test_metadata_notify.c.
References _seen, DT_METADATA_NOTICE_MESSAGE, DT_METADATA_NOTICE_TOAST, dt_metadata_notify(), dt_metadata_set_notify_handler(), dt_metadata_set_tags_changed_handler(), dt_metadata_tags_changed(), L, _seen_t::messages, state, _seen_t::tag_changes, _seen_t::toasts, and void().
Referenced by main().
Definition at line 136 of file test_metadata_notify.c.
References _record_tag_change(), _seen, dt_metadata_set_tags_changed_handler(), dt_metadata_tags_changed(), L, state, _seen_t::tag_changes, and void().
Referenced by main().
|
static |
Definition at line 53 of file test_metadata_notify.c.
Referenced by _record(), _record_tag_change(), _setup(), _teardown(), test_channels_are_independent(), test_handler_can_be_removed(), test_kinds_stay_distinct(), test_no_handler_is_silent(), and test_tags_changed_fires_each_time().