![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
#include "testdb.h"
Include dependency graph for test_image_repository.c:Go to the source code of this file.
Macros | |
| #define | TEST_FLAG 2048 |
Functions | |
| static void | test_flag_among_multi_image (void **state) |
| static void | test_set_flags_masked_leaves_other_bits (void **state) |
| static void | test_full_paths (void **state) |
| static void | test_id_range (void **state) |
| static void | test_write_timestamp_is_64bit (void **state) |
| static void | test_group_member_rows (void **state) |
| static void | test_count_distinct_fields (void **state) |
| static gboolean | _count_two_rows (const int32_t imgid, const int64_t write_timestamp, const int version, const char *image_path, const int flags, void *user_data) |
| static void | test_foreach_with_path_stops_when_asked (void **state) |
| int | main (void) |
| #define TEST_FLAG 2048 |
Contracts of database/image_repository.h that the migration promised to keep.
The first test is a regression test for a real bug: the callers this repository absorbed used to bind a comma-joined id string to a single IN (?) parameter, which SQLite reads as ONE value – it matched a lone id and matched NOTHING for two or more. The repository builds the set into the statement as integers; these tests hold it there.
Definition at line 31 of file test_image_repository.c.
|
static |
Definition at line 207 of file test_image_repository.c.
References flags, L, and void().
Referenced by test_foreach_with_path_stops_when_asked().
| int main | ( | void | ) |
Definition at line 237 of file test_image_repository.c.
References L, test_count_distinct_fields(), test_flag_among_multi_image(), test_foreach_with_path_stops_when_asked(), test_full_paths(), test_group_member_rows(), test_id_range(), test_set_flags_masked_leaves_other_bits(), test_write_timestamp_is_64bit(), testdb_setup(), and testdb_teardown().
Definition at line 183 of file test_image_repository.c.
References DT_IMAGE_FIELD_FILENAME, DT_IMAGE_FIELD_FILM_ROLL, DT_IMAGE_FIELD_IMGID, DT_IMAGE_FIELD_VERSION, dt_image_repository_count_distinct_fields(), L, state, testdb_make_film(), testdb_make_image(), and void().
Referenced by main().
Definition at line 33 of file test_image_repository.c.
References dt_image_repository_get_ids_with_flag_among(), dt_image_repository_set_flag_among(), L, state, TEST_FLAG, testdb_make_film(), testdb_make_image(), and void().
Referenced by main().
Definition at line 223 of file test_image_repository.c.
References _count_two_rows(), dt_image_repository_foreach_with_path(), L, state, testdb_make_film(), testdb_make_image(), and void().
Referenced by main().
Definition at line 117 of file test_image_repository.c.
References dt_image_repository_get_full_paths(), L, state, testdb_make_film(), testdb_make_image(), and void().
Referenced by main().
Definition at line 162 of file test_image_repository.c.
References dt_image_group_member_free(), dt_image_repository_get_group_member_rows(), dt_image_repository_set_group(), dt_image_group_member_t::filename, dt_image_group_member_t::imgid, L, state, testdb_make_film(), testdb_make_image(), and void().
Referenced by main().
Definition at line 134 of file test_image_repository.c.
References dt_image_repository_count_in_id_range(), L, state, testdb_make_film(), testdb_make_image(), and void().
Referenced by main().
Definition at line 76 of file test_image_repository.c.
References dt_image_repository_get_ids_with_flag_among(), dt_image_repository_set_flag_among(), dt_image_repository_set_flags_masked(), L, state, TEST_FLAG, testdb_make_film(), testdb_make_image(), and void().
Referenced by main().
Definition at line 148 of file test_image_repository.c.
References dt_image_repository_get_write_timestamp(), dt_image_repository_set_write_timestamp(), L, state, testdb_make_film(), testdb_make_image(), and void().
Referenced by main().