Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
test_metadata_notify.c File Reference
#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
 

Typedef Documentation

◆ _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.

Function Documentation

◆ _record()

◆ _record_tag_change()

static void _record_tag_change ( void  )
static

◆ _setup()

static int _setup ( void **  state)
static

Definition at line 68 of file test_metadata_notify.c.

References _seen, L, state, and void().

Referenced by main().

◆ _teardown()

static int _teardown ( void **  state)
static

◆ main()

◆ test_channels_are_independent()

◆ test_handler_can_be_removed()

static void test_handler_can_be_removed ( void **  state)
static

◆ test_kinds_stay_distinct()

◆ test_no_handler_is_silent()

◆ test_tags_changed_fires_each_time()

static void test_tags_changed_fires_each_time ( void **  state)
static

Variable Documentation

◆ _seen