![]() |
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 "win/main_wrapper.h"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 (int argc, char *argv[]) |
Variables | |
| static _seen_t | _seen |
| typedef struct _seen_t _seen_t |
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 59 of file test_metadata_notify.c.
References _seen, DT_METADATA_NOTICE_TOAST, g_free(), and kind.
Referenced by test_channels_are_independent(), test_handler_can_be_removed(), and test_kinds_stay_distinct().
Definition at line 67 of file test_metadata_notify.c.
References _seen.
Referenced by test_channels_are_independent(), and test_tags_changed_fires_each_time().
|
static |
Definition at line 72 of file test_metadata_notify.c.
|
static |
Definition at line 79 of file test_metadata_notify.c.
References _seen, dt_metadata_set_notify_handler(), dt_metadata_set_tags_changed_handler(), g_free(), state, and void().
| int main | ( | int | argc, |
| char * | argv[] ) |
Definition at line 172 of file test_metadata_notify.c.
References _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().
Definition at line 155 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(), state, and void().
Referenced by main().
Definition at line 126 of file test_metadata_notify.c.
References _record(), _seen, DT_METADATA_NOTICE_MESSAGE, dt_metadata_notify(), dt_metadata_set_notify_handler(), state, and void().
Referenced by main().
Definition at line 108 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(), state, and void().
Referenced by main().
Definition at line 91 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(), state, and void().
Referenced by main().
Definition at line 140 of file test_metadata_notify.c.
References _record_tag_change(), _seen, dt_metadata_set_tags_changed_handler(), dt_metadata_tags_changed(), state, and void().
Referenced by main().
|
static |
Definition at line 57 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().