Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
test_preset_repository.c File Reference
#include "testdb.h"
+ Include dependency graph for test_preset_repository.c:

Go to the source code of this file.

Functions

static void test_set_module_version_leaves_params_alone (void **state)
 
static void test_list_for_upgrade_returns_all_versions (void **state)
 
static void test_list_editable_excludes_shipped (void **state)
 
static void test_list_all_carries_the_tree_row (void **state)
 
int main (void)
 

Variables

static const unsigned char params_a [] = { 0x01, 0x02, 0x03, 0x04, 0x05 }
 
static const unsigned char params_b [] = { 0x0a, 0x0b, 0x0c }
 

Function Documentation

◆ main()

◆ test_list_all_carries_the_tree_row()

◆ test_list_editable_excludes_shipped()

◆ test_list_for_upgrade_returns_all_versions()

static void test_list_for_upgrade_returns_all_versions ( void **  state)
static

◆ test_set_module_version_leaves_params_alone()

Variable Documentation

◆ params_a

const unsigned char params_a[] = { 0x01, 0x02, 0x03, 0x04, 0x05 }
static

Contracts of database/preset_repository.h.

The central one is the data-loss trap the migration had to step around: data.presets is UNIQUE on (name, operation, op_version), so an (operation, name) predicate is legitimately multi-row, and the version-only setter must not touch op_params – a setter that wrote both would stamp one preset's blob onto every other version of the same name. dt_preset_repository_set_module_version() exists precisely so dt_preset_repository_update_module_params() is never used for that.

Definition at line 32 of file test_preset_repository.c.

Referenced by test_list_all_carries_the_tree_row(), test_list_editable_excludes_shipped(), test_list_for_upgrade_returns_all_versions(), and test_set_module_version_leaves_params_alone().

◆ params_b

const unsigned char params_b[] = { 0x0a, 0x0b, 0x0c }
static