mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2025-12-20 03:30:19 +01:00
shared: rename a few weston assert
Currently weston-test-assert.h has a better naming style than weston-assert.h: more concise and standardized. So let's copy the same style to weston-assert.h Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
This commit is contained in:
parent
b268b3827c
commit
a4cefa69a2
12 changed files with 66 additions and 54 deletions
|
|
@ -2164,8 +2164,8 @@ lut_3x1d_from_blend_to_output(struct weston_compositor *compositor,
|
||||||
* No need to craft LUT 3x1D from identity. But there shouldn't be a
|
* No need to craft LUT 3x1D from identity. But there shouldn't be a
|
||||||
* blend-to-output xform like this in first place.
|
* blend-to-output xform like this in first place.
|
||||||
*/
|
*/
|
||||||
weston_assert_uint32_neq(compositor, xform->pre_curve.type,
|
weston_assert_u32_ne(compositor, xform->pre_curve.type,
|
||||||
WESTON_COLOR_CURVE_TYPE_IDENTITY);
|
WESTON_COLOR_CURVE_TYPE_IDENTITY);
|
||||||
|
|
||||||
return weston_color_curve_to_3x1D_LUT(compositor, xform,
|
return weston_color_curve_to_3x1D_LUT(compositor, xform,
|
||||||
WESTON_COLOR_CURVE_STEP_PRE,
|
WESTON_COLOR_CURVE_STEP_PRE,
|
||||||
|
|
|
||||||
|
|
@ -748,7 +748,7 @@ cmlcms_send_image_desc_info(struct cm_image_desc_info *cm_image_desc_info,
|
||||||
}
|
}
|
||||||
|
|
||||||
len = os_ro_anonymous_file_size(cprof->icc.prof_rofile);
|
len = os_ro_anonymous_file_size(cprof->icc.prof_rofile);
|
||||||
weston_assert_uint32_gt(compositor, len, 0);
|
weston_assert_u32_gt(compositor, len, 0);
|
||||||
|
|
||||||
weston_cm_send_icc_file(cm_image_desc_info, fd, len);
|
weston_cm_send_icc_file(cm_image_desc_info, fd, len);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -424,8 +424,8 @@ lcms_curve_matches_any_tf(struct weston_compositor *compositor,
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
weston_assert_uint32_lt_or_eq(compositor,
|
weston_assert_u32_le(compositor,
|
||||||
n_lcms_curve_params, MAX_PARAMS_LCMS_PARAM_CURVE);
|
n_lcms_curve_params, MAX_PARAMS_LCMS_PARAM_CURVE);
|
||||||
|
|
||||||
for (i = 0; i < 3; i++)
|
for (i = 0; i < 3; i++)
|
||||||
for (j = 0; j < n_lcms_curve_params; j++)
|
for (j = 0; j < n_lcms_curve_params; j++)
|
||||||
|
|
@ -880,7 +880,7 @@ translate_curve_element_LUT(struct cmlcms_color_transform *xform,
|
||||||
curve->type = WESTON_COLOR_CURVE_TYPE_LUT_3x1D;
|
curve->type = WESTON_COLOR_CURVE_TYPE_LUT_3x1D;
|
||||||
curve->u.lut_3x1d.optimal_len = cmlcms_reasonable_1D_points();
|
curve->u.lut_3x1d.optimal_len = cmlcms_reasonable_1D_points();
|
||||||
|
|
||||||
weston_assert_uint32_eq(compositor, trc_data->nCurves, 3);
|
weston_assert_u32_eq(compositor, trc_data->nCurves, 3);
|
||||||
for (i = 0; i < 3; i++) {
|
for (i = 0; i < 3; i++) {
|
||||||
stash[i] = cmsDupToneCurve(trc_data->TheCurves[i]);
|
stash[i] = cmsDupToneCurve(trc_data->TheCurves[i]);
|
||||||
abort_oom_if_null(stash[i]);
|
abort_oom_if_null(stash[i]);
|
||||||
|
|
@ -896,8 +896,8 @@ translate_curve_element(struct cmlcms_color_transform *xform,
|
||||||
struct weston_compositor *compositor = xform->base.cm->compositor;
|
struct weston_compositor *compositor = xform->base.cm->compositor;
|
||||||
_cmsStageToneCurvesData *trc_data;
|
_cmsStageToneCurvesData *trc_data;
|
||||||
|
|
||||||
weston_assert_uint64_eq(compositor, cmsStageType(elem),
|
weston_assert_u64_eq(compositor, cmsStageType(elem),
|
||||||
cmsSigCurveSetElemType);
|
cmsSigCurveSetElemType);
|
||||||
|
|
||||||
trc_data = cmsStageData(elem);
|
trc_data = cmsStageData(elem);
|
||||||
if (trc_data->nCurves != 3)
|
if (trc_data->nCurves != 3)
|
||||||
|
|
@ -1314,10 +1314,10 @@ init_icc_to_icc_chain(struct cmlcms_color_transform *xform)
|
||||||
struct lcmsProfilePtr chain[5];
|
struct lcmsProfilePtr chain[5];
|
||||||
unsigned chain_len = 0;
|
unsigned chain_len = 0;
|
||||||
|
|
||||||
weston_assert_uint32_eq(cm->base.compositor, out_prof->type, CMLCMS_PROFILE_TYPE_ICC);
|
weston_assert_u32_eq(cm->base.compositor, out_prof->type, CMLCMS_PROFILE_TYPE_ICC);
|
||||||
if (in_prof) {
|
if (in_prof) {
|
||||||
weston_assert_uint32_eq(cm->base.compositor, in_prof->type,
|
weston_assert_u32_eq(cm->base.compositor, in_prof->type,
|
||||||
CMLCMS_PROFILE_TYPE_ICC);
|
CMLCMS_PROFILE_TYPE_ICC);
|
||||||
}
|
}
|
||||||
|
|
||||||
render_intent = xform->search_key.render_intent;
|
render_intent = xform->search_key.render_intent;
|
||||||
|
|
@ -1393,9 +1393,9 @@ init_blend_to_parametric(struct cmlcms_color_transform *xform)
|
||||||
{
|
{
|
||||||
struct weston_color_profile_params *out = xform->search_key.output_profile->params;
|
struct weston_color_profile_params *out = xform->search_key.output_profile->params;
|
||||||
|
|
||||||
weston_assert_uint32_eq(xform->base.cm->compositor,
|
weston_assert_u32_eq(xform->base.cm->compositor,
|
||||||
xform->search_key.output_profile->type,
|
xform->search_key.output_profile->type,
|
||||||
CMLCMS_PROFILE_TYPE_PARAMS);
|
CMLCMS_PROFILE_TYPE_PARAMS);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* For blend-to-output with a parametric output profile, all we need
|
* For blend-to-output with a parametric output profile, all we need
|
||||||
|
|
@ -1560,12 +1560,10 @@ init_parametric_to_parametric(struct cmlcms_color_transform *xform)
|
||||||
struct weston_mat4f mat;
|
struct weston_mat4f mat;
|
||||||
char *errmsg = NULL;
|
char *errmsg = NULL;
|
||||||
|
|
||||||
weston_assert_uint32_eq(cm->base.compositor,
|
weston_assert_u32_eq(cm->base.compositor, recipe->input_profile->type,
|
||||||
recipe->input_profile->type,
|
CMLCMS_PROFILE_TYPE_PARAMS);
|
||||||
CMLCMS_PROFILE_TYPE_PARAMS);
|
weston_assert_u32_eq(cm->base.compositor, recipe->output_profile->type,
|
||||||
weston_assert_uint32_eq(cm->base.compositor,
|
CMLCMS_PROFILE_TYPE_PARAMS);
|
||||||
recipe->output_profile->type,
|
|
||||||
CMLCMS_PROFILE_TYPE_PARAMS);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Decode input TF
|
* Decode input TF
|
||||||
|
|
|
||||||
|
|
@ -1741,9 +1741,9 @@ weston_compositor_enable_color_management_protocol(struct weston_compositor *com
|
||||||
{
|
{
|
||||||
uint32_t version = 1;
|
uint32_t version = 1;
|
||||||
|
|
||||||
weston_assert_bit_is_set(compositor,
|
weston_assert_bit_set(compositor,
|
||||||
compositor->color_manager->supported_rendering_intents,
|
compositor->color_manager->supported_rendering_intents,
|
||||||
1ull << WESTON_RENDER_INTENT_PERCEPTUAL);
|
1ull << WESTON_RENDER_INTENT_PERCEPTUAL);
|
||||||
|
|
||||||
if (!wl_global_create(compositor->wl_display,
|
if (!wl_global_create(compositor->wl_display,
|
||||||
&wp_color_manager_v1_interface,
|
&wp_color_manager_v1_interface,
|
||||||
|
|
|
||||||
|
|
@ -245,8 +245,8 @@ cmnoop_destroy(struct weston_color_manager *cm_base)
|
||||||
* Currently we have a bug in which we leak surfaces when shutting down
|
* Currently we have a bug in which we leak surfaces when shutting down
|
||||||
* Weston with client surfaces alive, and these surfaces may have a
|
* Weston with client surfaces alive, and these surfaces may have a
|
||||||
* reference to the stock sRGB profile. */
|
* reference to the stock sRGB profile. */
|
||||||
weston_assert_uint32_gt_or_eq(cm_base->compositor,
|
weston_assert_u32_ge(cm_base->compositor,
|
||||||
cmnoop->stock_cprof->base.ref_count, 1);
|
cmnoop->stock_cprof->base.ref_count, 1);
|
||||||
unref_cprof(cmnoop->stock_cprof);
|
unref_cprof(cmnoop->stock_cprof);
|
||||||
|
|
||||||
free(cmnoop);
|
free(cmnoop);
|
||||||
|
|
|
||||||
|
|
@ -311,8 +311,8 @@ weston_color_profile_param_builder_set_tf_named(struct weston_color_profile_para
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
builder->params.tf_info = weston_color_tf_info_from(compositor, tf);
|
builder->params.tf_info = weston_color_tf_info_from(compositor, tf);
|
||||||
weston_assert_uint32_eq(builder->compositor,
|
weston_assert_u32_eq(builder->compositor,
|
||||||
builder->params.tf_info->count_parameters, 0);
|
builder->params.tf_info->count_parameters, 0);
|
||||||
|
|
||||||
builder->group_mask |= WESTON_COLOR_PROFILE_PARAMS_TF;
|
builder->group_mask |= WESTON_COLOR_PROFILE_PARAMS_TF;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -260,7 +260,7 @@ weston_color_curve_enum_get_parametric(struct weston_compositor *compositor,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* No other TF's have params. */
|
/* No other TF's have params. */
|
||||||
weston_assert_uint32_eq(compositor, curve->tf->count_parameters, 0);
|
weston_assert_u32_eq(compositor, curve->tf->count_parameters, 0);
|
||||||
|
|
||||||
if (!curve->tf->curve_params_valid)
|
if (!curve->tf->curve_params_valid)
|
||||||
return false;
|
return false;
|
||||||
|
|
@ -456,7 +456,7 @@ find_neighbors(struct weston_compositor *compositor, uint32_t len, float *array,
|
||||||
int32_t mid;
|
int32_t mid;
|
||||||
|
|
||||||
/* We need at least 2 elements in the array. */
|
/* We need at least 2 elements in the array. */
|
||||||
weston_assert_uint32_gt(compositor, len, 1);
|
weston_assert_u32_gt(compositor, len, 1);
|
||||||
|
|
||||||
while (right - left > 1) {
|
while (right - left > 1) {
|
||||||
mid = left + ((right - left) / 2);
|
mid = left + ((right - left) / 2);
|
||||||
|
|
|
||||||
|
|
@ -103,7 +103,7 @@ update_lowest_free_bucket(struct weston_idalloc *idalloc)
|
||||||
|
|
||||||
/* We didn't find any free bucket, so we need to add more buckets. */
|
/* We didn't find any free bucket, so we need to add more buckets. */
|
||||||
next_num = idalloc->num_buckets * 2;
|
next_num = idalloc->num_buckets * 2;
|
||||||
weston_assert_uint32_gt(idalloc->compositor, next_num, idalloc->num_buckets);
|
weston_assert_u32_gt(idalloc->compositor, next_num, idalloc->num_buckets);
|
||||||
|
|
||||||
idalloc->buckets = xrealloc(idalloc->buckets, next_num * sizeof(*idalloc->buckets));
|
idalloc->buckets = xrealloc(idalloc->buckets, next_num * sizeof(*idalloc->buckets));
|
||||||
memset(&idalloc->buckets[idalloc->num_buckets], 0,
|
memset(&idalloc->buckets[idalloc->num_buckets], 0,
|
||||||
|
|
@ -129,7 +129,7 @@ weston_idalloc_get_id(struct weston_idalloc *idalloc)
|
||||||
uint32_t id;
|
uint32_t id;
|
||||||
|
|
||||||
/* Sanity check: lowest free bucket should not be full. */
|
/* Sanity check: lowest free bucket should not be full. */
|
||||||
weston_assert_uint32_neq(idalloc->compositor, *bucket, 0xffffffff);
|
weston_assert_u32_ne(idalloc->compositor, *bucket, 0xffffffff);
|
||||||
|
|
||||||
for (i = 0; i < 32; i++) {
|
for (i = 0; i < 32; i++) {
|
||||||
/* Id already used, skip it. */
|
/* Id already used, skip it. */
|
||||||
|
|
@ -170,11 +170,11 @@ weston_idalloc_put_id(struct weston_idalloc *idalloc, uint32_t id)
|
||||||
uint32_t *bucket;
|
uint32_t *bucket;
|
||||||
|
|
||||||
/* Shouldn't try to release index 0, we never advertise this id to anyone. */
|
/* Shouldn't try to release index 0, we never advertise this id to anyone. */
|
||||||
weston_assert_uint32_neq(idalloc->compositor, id, 0);
|
weston_assert_u32_ne(idalloc->compositor, id, 0);
|
||||||
|
|
||||||
/* Bucket index should be lower than num_buckets. */
|
/* Bucket index should be lower than num_buckets. */
|
||||||
weston_assert_uint32_lt(idalloc->compositor,
|
weston_assert_u32_lt(idalloc->compositor,
|
||||||
bucket_index, idalloc->num_buckets);
|
bucket_index, idalloc->num_buckets);
|
||||||
|
|
||||||
bucket = &idalloc->buckets[bucket_index];
|
bucket = &idalloc->buckets[bucket_index];
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -290,7 +290,7 @@ get_uniform_location(struct gl_renderer *gr,
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
ret = snprintf(str, sizeof str, "%s_%s", prefix, field);
|
ret = snprintf(str, sizeof str, "%s_%s", prefix, field);
|
||||||
weston_assert_uint32_lt(gr->compositor, ret, sizeof str);
|
weston_assert_u32_lt(gr->compositor, ret, sizeof str);
|
||||||
|
|
||||||
return glGetUniformLocation(program, str);
|
return glGetUniformLocation(program, str);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -75,6 +75,8 @@ weston_assert_fail_(const struct weston_compositor *compositor, const char *fmt,
|
||||||
cond; \
|
cond; \
|
||||||
})
|
})
|
||||||
|
|
||||||
|
/* Misc asserts. */
|
||||||
|
|
||||||
#define weston_assert_not_reached(compositor, reason) \
|
#define weston_assert_not_reached(compositor, reason) \
|
||||||
do { \
|
do { \
|
||||||
struct weston_compositor *ec = compositor; \
|
struct weston_compositor *ec = compositor; \
|
||||||
|
|
@ -82,12 +84,16 @@ do { \
|
||||||
__FILE__, __LINE__, reason); \
|
__FILE__, __LINE__, reason); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
|
/* Boolean asserts. */
|
||||||
|
|
||||||
#define weston_assert_true(compositor, a) \
|
#define weston_assert_true(compositor, a) \
|
||||||
weston_assert_(compositor, a, true, bool, "%d", ==)
|
weston_assert_(compositor, a, true, bool, "%d", ==)
|
||||||
|
|
||||||
#define weston_assert_false(compositor, a) \
|
#define weston_assert_false(compositor, a) \
|
||||||
weston_assert_(compositor, a, false, bool, "%d", ==)
|
weston_assert_(compositor, a, false, bool, "%d", ==)
|
||||||
|
|
||||||
|
/* Pointer asserts. */
|
||||||
|
|
||||||
#define weston_assert_ptr_not_null(compositor, a) \
|
#define weston_assert_ptr_not_null(compositor, a) \
|
||||||
weston_assert_(compositor, a, NULL, const void *, "%p", !=)
|
weston_assert_(compositor, a, NULL, const void *, "%p", !=)
|
||||||
|
|
||||||
|
|
@ -97,34 +103,42 @@ do { \
|
||||||
#define weston_assert_ptr_eq(compositor, a, b) \
|
#define weston_assert_ptr_eq(compositor, a, b) \
|
||||||
weston_assert_(compositor, a, b, const void *, "%p", ==)
|
weston_assert_(compositor, a, b, const void *, "%p", ==)
|
||||||
|
|
||||||
#define weston_assert_double_eq(compositor, a, b) \
|
/* Floating-point asserts. */
|
||||||
|
|
||||||
|
#define weston_assert_f64_eq(compositor, a, b) \
|
||||||
weston_assert_(compositor, a, b, double, "%.10g", ==)
|
weston_assert_(compositor, a, b, double, "%.10g", ==)
|
||||||
|
|
||||||
#define weston_assert_uint32_eq(compositor, a, b) \
|
/* Unsigned int asserts. */
|
||||||
|
|
||||||
|
#define weston_assert_u32_eq(compositor, a, b) \
|
||||||
weston_assert_(compositor, a, b, uint32_t, "%u", ==)
|
weston_assert_(compositor, a, b, uint32_t, "%u", ==)
|
||||||
|
|
||||||
#define weston_assert_uint32_neq(compositor, a, b) \
|
#define weston_assert_u32_ne(compositor, a, b) \
|
||||||
weston_assert_(compositor, a, b, uint32_t, "%u", !=)
|
weston_assert_(compositor, a, b, uint32_t, "%u", !=)
|
||||||
|
|
||||||
#define weston_assert_uint32_gt(compositor, a, b) \
|
#define weston_assert_u32_gt(compositor, a, b) \
|
||||||
weston_assert_(compositor, a, b, uint32_t, "%u", >)
|
weston_assert_(compositor, a, b, uint32_t, "%u", >)
|
||||||
|
|
||||||
#define weston_assert_uint32_gt_or_eq(compositor, a, b) \
|
#define weston_assert_u32_ge(compositor, a, b) \
|
||||||
weston_assert_(compositor, a, b, uint32_t, "%u", >=)
|
weston_assert_(compositor, a, b, uint32_t, "%u", >=)
|
||||||
|
|
||||||
#define weston_assert_uint32_lt(compositor, a, b) \
|
#define weston_assert_u32_lt(compositor, a, b) \
|
||||||
weston_assert_(compositor, a, b, uint32_t, "%u", <)
|
weston_assert_(compositor, a, b, uint32_t, "%u", <)
|
||||||
|
|
||||||
#define weston_assert_uint32_lt_or_eq(compositor, a, b) \
|
#define weston_assert_u32_le(compositor, a, b) \
|
||||||
weston_assert_(compositor, a, b, uint32_t, "%u", <=)
|
weston_assert_(compositor, a, b, uint32_t, "%u", <=)
|
||||||
|
|
||||||
#define weston_assert_uint64_eq(compositor, a, b) \
|
#define weston_assert_u64_eq(compositor, a, b) \
|
||||||
weston_assert_(compositor, a, b, uint64_t, "%" PRIx64, ==)
|
weston_assert_(compositor, a, b, uint64_t, "%" PRIx64, ==)
|
||||||
|
|
||||||
|
/* String asserts. */
|
||||||
|
|
||||||
#define weston_assert_str_eq(compositor, a, b) \
|
#define weston_assert_str_eq(compositor, a, b) \
|
||||||
weston_assert_fn_(compositor, strcmp, a, b, const char *, "%s", ==)
|
weston_assert_fn_(compositor, strcmp, a, b, const char *, "%s", ==)
|
||||||
|
|
||||||
#define weston_assert_bit_is_set(compositor, value, bit) \
|
/* Bitmask asserts. */
|
||||||
|
|
||||||
|
#define weston_assert_bit_set(compositor, value, bit) \
|
||||||
({ \
|
({ \
|
||||||
struct weston_compositor *ec = compositor; \
|
struct weston_compositor *ec = compositor; \
|
||||||
uint64_t v = (value); \
|
uint64_t v = (value); \
|
||||||
|
|
@ -137,7 +151,7 @@ do { \
|
||||||
cond; \
|
cond; \
|
||||||
})
|
})
|
||||||
|
|
||||||
#define weston_assert_bit_is_not_set(compositor, value, bit) \
|
#define weston_assert_bit_not_set(compositor, value, bit) \
|
||||||
({ \
|
({ \
|
||||||
struct weston_compositor *ec = compositor; \
|
struct weston_compositor *ec = compositor; \
|
||||||
uint64_t v = (value); \
|
uint64_t v = (value); \
|
||||||
|
|
|
||||||
|
|
@ -100,15 +100,15 @@ TEST(asserts)
|
||||||
abort_if_not(ret == false);
|
abort_if_not(ret == false);
|
||||||
|
|
||||||
double fifteen = 15.0;
|
double fifteen = 15.0;
|
||||||
ret = weston_assert_double_eq(compositor, fifteen, 15.000001);
|
ret = weston_assert_f64_eq(compositor, fifteen, 15.000001);
|
||||||
abort_if_not(ret == false);
|
abort_if_not(ret == false);
|
||||||
|
|
||||||
ret = weston_assert_double_eq(compositor, fifteen, 15);
|
ret = weston_assert_f64_eq(compositor, fifteen, 15);
|
||||||
abort_if_not(ret);
|
abort_if_not(ret);
|
||||||
|
|
||||||
ret = weston_assert_uint32_lt_or_eq(compositor, 0, 0);
|
ret = weston_assert_u32_le(compositor, 0, 0);
|
||||||
abort_if_not(ret);
|
abort_if_not(ret);
|
||||||
ret = weston_assert_uint32_lt_or_eq(compositor, 1, 0);
|
ret = weston_assert_u32_le(compositor, 1, 0);
|
||||||
abort_if_not(ret == false);
|
abort_if_not(ret == false);
|
||||||
|
|
||||||
const char *nom = "bar";
|
const char *nom = "bar";
|
||||||
|
|
@ -125,13 +125,13 @@ TEST(asserts)
|
||||||
abort_if_not(ret == false);
|
abort_if_not(ret == false);
|
||||||
|
|
||||||
uint32_t bitfield = 0xffff;
|
uint32_t bitfield = 0xffff;
|
||||||
ret = weston_assert_bit_is_set(compositor, bitfield, 1ull << 2);
|
ret = weston_assert_bit_set(compositor, bitfield, 1ull << 2);
|
||||||
abort_if_not(ret);
|
abort_if_not(ret);
|
||||||
ret = weston_assert_bit_is_set(compositor, bitfield, 1ull << 57);
|
ret = weston_assert_bit_set(compositor, bitfield, 1ull << 57);
|
||||||
abort_if_not(ret == false);
|
abort_if_not(ret == false);
|
||||||
|
|
||||||
uint64_t max_uint64 = UINT64_MAX;
|
uint64_t max_uint64 = UINT64_MAX;
|
||||||
ret = weston_assert_uint64_eq(compositor, max_uint64, 0);
|
ret = weston_assert_u64_eq(compositor, max_uint64, 0);
|
||||||
abort_if_not(ret == false);
|
abort_if_not(ret == false);
|
||||||
|
|
||||||
uint64_t val = 0x200010001000ffff;
|
uint64_t val = 0x200010001000ffff;
|
||||||
|
|
|
||||||
|
|
@ -166,8 +166,8 @@ test_assert_fail(void *compositor, const char *fmt, ...)
|
||||||
|
|
||||||
/* Various helpers. */
|
/* Various helpers. */
|
||||||
|
|
||||||
#define test_assert_bit_set(a, bit) weston_assert_bit_is_set(NULL, a, bit)
|
#define test_assert_bit_set(a, bit) weston_assert_bit_set(NULL, a, bit)
|
||||||
#define test_assert_bit_not_set(a, bit) weston_assert_bit_is_not_set(NULL, a, bit)
|
#define test_assert_bit_not_set(a, bit) weston_assert_bit_not_set(NULL, a, bit)
|
||||||
#define test_assert_errno(a) test_assert_int_eq(a, errno)
|
#define test_assert_errno(a) test_assert_int_eq(a, errno)
|
||||||
#define test_assert_enum(a, b) test_assert_u64_eq(a, b)
|
#define test_assert_enum(a, b) test_assert_u64_eq(a, b)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue