Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
test_tagging_completion.c File Reference
#include "libs/tagging_completion.h"
#include <stdarg.h>
#include <stddef.h>
#include <setjmp.h>
#include <stdint.h>
#include <cmocka.h>
+ Include dependency graph for test_tagging_completion.c:

Go to the source code of this file.

Data Structures

struct  dt_tagging_completion_test_t
 
struct  dt_return_handler_state_t
 

Typedefs

typedef struct dt_tagging_completion_test_t dt_tagging_completion_test_t
 
typedef struct dt_return_handler_state_t dt_return_handler_state_t
 

Functions

static void _append_completion (dt_tagging_completion_test_t *test, const char *text)
 
static void _drain_gtk_events ()
 
static gboolean _quit_main_loop (GMainLoop *loop)
 
static void _wait_for_completion_sources ()
 
static gboolean _completion_popup_is_mapped (GtkWidget *entry_window)
 
static gboolean _send_key (GtkWidget *widget, const guint keyval)
 
static gboolean _match_last_hierarchical_token (GtkEntryCompletion *completion, const gchar *key, GtkTreeIter *iter, gpointer user_data)
 
static int _setup_completion (void **state)
 
static int _teardown_completion (void **state)
 
static gboolean _record_plain_return (GtkWidget *entry, GdkEventKey *event, dt_return_handler_state_t *state)
 
static void test_clear_cancels_completion_before_model_refresh (void **state)
 
static void test_completion_survives_repeated_single_and_hierarchical_clears (void **state)
 
static void test_clear_supports_entry_without_completion (void **state)
 
static void test_selected_completion_replaces_only_the_active_token (void **state)
 
static void test_completion_keeps_return_priority_after_reattach (void **state)
 
int main (int argc, char **argv)
 

Typedef Documentation

◆ dt_return_handler_state_t

◆ dt_tagging_completion_test_t

Function Documentation

◆ _append_completion()

static void _append_completion ( dt_tagging_completion_test_t test,
const char *  text 
)
static

◆ _completion_popup_is_mapped()

◆ _drain_gtk_events()

static void _drain_gtk_events ( )
static

◆ _match_last_hierarchical_token()

static gboolean _match_last_hierarchical_token ( GtkEntryCompletion *  completion,
const gchar *  key,
GtkTreeIter *  iter,
gpointer  user_data 
)
static

Definition at line 94 of file test_tagging_completion.c.

References key.

Referenced by _setup_completion().

◆ _quit_main_loop()

static gboolean _quit_main_loop ( GMainLoop *  loop)
static

Definition at line 53 of file test_tagging_completion.c.

Referenced by _wait_for_completion_sources().

◆ _record_plain_return()

static gboolean _record_plain_return ( GtkWidget entry,
GdkEventKey *  event,
dt_return_handler_state_t state 
)
static

Definition at line 153 of file test_tagging_completion.c.

References FALSE, and state.

Referenced by test_completion_keeps_return_priority_after_reattach().

◆ _send_key()

static gboolean _send_key ( GtkWidget widget,
const guint  keyval 
)
static

Definition at line 80 of file test_tagging_completion.c.

References FALSE, and TRUE.

Referenced by test_completion_keeps_return_priority_after_reattach().

◆ _setup_completion()

◆ _teardown_completion()

◆ _wait_for_completion_sources()

◆ main()

◆ test_clear_cancels_completion_before_model_refresh()

◆ test_clear_supports_entry_without_completion()

static void test_clear_supports_entry_without_completion ( void **  state)
static

Definition at line 204 of file test_tagging_completion.c.

References dt_tagging_entry_clear().

Referenced by main().

◆ test_completion_keeps_return_priority_after_reattach()

◆ test_completion_survives_repeated_single_and_hierarchical_clears()

◆ test_selected_completion_replaces_only_the_active_token()