Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
test_masks_raster_contract.c File Reference
#include "develop/masks.h"
#include "develop/masks/masks_functions.h"
#include "develop/masks/masks_touched.h"
#include "develop/masks_group.h"
#include "develop/develop.h"
#include <stdarg.h>
#include <stddef.h>
#include <setjmp.h>
#include <stdint.h>
#include <cmocka.h>
+ Include dependency graph for test_masks_raster_contract.c:

Go to the source code of this file.

Data Structures

struct  _shape_t
 
struct  _write_fixture_t
 

Functions

static dt_masks_form_t _empty_form (const _shape_t *shape)
 
static void _from_status_maps_zero_to_ok_and_everything_else_to_error (void **state)
 
static void _a_shape_with_no_geometry_rasterises_empty (void **state)
 
static void _a_shape_with_no_rasteriser_is_an_error (void **state)
 
static void _an_unbuildable_outline_is_never_reported_as_built (void **state)
 
static void _area_and_mask_always_write_their_out_parameters (void **state)
 
static void _form_info_describes_a_shape (void **state)
 
static void _form_info_leaves_out_untouched_on_failure (void **state)
 
static void _copy_members_preserves_order_and_reports_the_total (void **state)
 
static void _copy_members_refuses_anything_that_is_not_a_group (void **state)
 
static void _type_tokens_are_the_persisted_conf_key_spellings (void **state)
 
static void _write_fixture_init (_write_fixture_t *f)
 
static void _write_fixture_cleanup (_write_fixture_t *f)
 
static void _set_operation_replaces_the_combine_op (void **state)
 
static void _setting_the_state_it_already_has_is_unchanged (void **state)
 
static void _inverse_toggles_and_leaves_the_operator_alone (void **state)
 
static void _set_operation_rejects_what_it_cannot_do (void **state)
 
static void _get_member_reads_a_row_by_identity (void **state)
 
static void _set_opacity_clamps_and_reports_what_it_stored (void **state)
 
static void _set_opacity_refuses_a_nan_rather_than_clamping_it (void **state)
 
static void _a_shared_group_is_cloned_before_its_opacity_changes (void **state)
 
static void _find_holder_names_the_group_that_references_a_shape (void **state)
 
int main (void)
 

Variables

static const _shape_t _shapes []
 
static const size_t _shape_count = sizeof(_shapes) / sizeof(_shapes[0])
 

Function Documentation

◆ _a_shape_with_no_geometry_rasterises_empty()

static void _a_shape_with_no_geometry_rasterises_empty ( void **  state)
static

◆ _a_shape_with_no_rasteriser_is_an_error()

static void _a_shape_with_no_rasteriser_is_an_error ( void **  state)
static

◆ _a_shared_group_is_cloned_before_its_opacity_changes()

static void _a_shared_group_is_cloned_before_its_opacity_changes ( void **  state)
static

◆ _an_unbuildable_outline_is_never_reported_as_built()

static void _an_unbuildable_outline_is_never_reported_as_built ( void **  state)
static

◆ _area_and_mask_always_write_their_out_parameters()

static void _area_and_mask_always_write_their_out_parameters ( void **  state)
static

◆ _copy_members_preserves_order_and_reports_the_total()

◆ _copy_members_refuses_anything_that_is_not_a_group()

static void _copy_members_refuses_anything_that_is_not_a_group ( void **  state)
static

◆ _empty_form()

static dt_masks_form_t _empty_form ( const _shape_t shape)
static

A form of the given kind carrying no geometry at all – the degenerate case every shape used to answer differently.

Definition at line 80 of file test_masks_raster_contract.c.

References dt_masks_form_t::functions, _shape_t::functions, dt_masks_form_t::points, dt_masks_form_t::type, and _shape_t::type.

Referenced by _a_shape_with_no_geometry_rasterises_empty(), _an_unbuildable_outline_is_never_reported_as_built(), and _area_and_mask_always_write_their_out_parameters().

◆ _find_holder_names_the_group_that_references_a_shape()

static void _find_holder_names_the_group_that_references_a_shape ( void **  state)
static

◆ _form_info_describes_a_shape()

◆ _form_info_leaves_out_untouched_on_failure()

static void _form_info_leaves_out_untouched_on_failure ( void **  state)
static

Definition at line 243 of file test_masks_raster_contract.c.

References dt_masks_form_get_info(), dt_masks_form_info_t::formid, state, and void().

Referenced by main().

◆ _from_status_maps_zero_to_ok_and_everything_else_to_error()

static void _from_status_maps_zero_to_ok_and_everything_else_to_error ( void **  state)
static

◆ _get_member_reads_a_row_by_identity()

static void _get_member_reads_a_row_by_identity ( void **  state)
static

◆ _inverse_toggles_and_leaves_the_operator_alone()

static void _inverse_toggles_and_leaves_the_operator_alone ( void **  state)
static

◆ _set_opacity_clamps_and_reports_what_it_stored()

static void _set_opacity_clamps_and_reports_what_it_stored ( void **  state)
static

◆ _set_opacity_refuses_a_nan_rather_than_clamping_it()

static void _set_opacity_refuses_a_nan_rather_than_clamping_it ( void **  state)
static

◆ _set_operation_rejects_what_it_cannot_do()

static void _set_operation_rejects_what_it_cannot_do ( void **  state)
static

◆ _set_operation_replaces_the_combine_op()

static void _set_operation_replaces_the_combine_op ( void **  state)
static

◆ _setting_the_state_it_already_has_is_unchanged()

static void _setting_the_state_it_already_has_is_unchanged ( void **  state)
static

◆ _type_tokens_are_the_persisted_conf_key_spellings()

static void _type_tokens_are_the_persisted_conf_key_spellings ( void **  state)
static

◆ _write_fixture_cleanup()

◆ _write_fixture_init()

◆ main()

Variable Documentation

◆ _shape_count

◆ _shapes

const _shape_t _shapes[]
static
Initial value:
= {
}
#define TRUE
Definition ashift_lsd.c:162
#define FALSE
Definition ashift_lsd.c:158
const dt_masks_functions_t dt_masks_functions_circle
Definition circle.c:1078
const dt_masks_functions_t dt_masks_functions_ellipse
Definition ellipse.c:1643
const dt_masks_functions_t dt_masks_functions_gradient
Definition gradient.c:1470
const dt_masks_functions_t dt_masks_functions_group
Definition group.c:1020
@ DT_MASKS_ELLIPSE
Definition masks_types.h:69
@ DT_MASKS_GRADIENT
Definition masks_types.h:68
@ DT_MASKS_CIRCLE
Definition masks_types.h:64
@ DT_MASKS_GROUP
Definition masks_types.h:66

Definition at line 70 of file test_masks_raster_contract.c.

Referenced by _a_shape_with_no_geometry_rasterises_empty(), _an_unbuildable_outline_is_never_reported_as_built(), and _area_and_mask_always_write_their_out_parameters().