From 07be8fec156ba8405f2aafa3a37fe29d06893f05 Mon Sep 17 00:00:00 2001 From: Matt Roper Date: Thu, 5 Mar 2015 15:01:00 -0800 Subject: igt.cocci: Replace igt_assert() with igt_assert_CMP() where possible The integer comparison macros give us better error output by including the actual values that failed the comparison. Signed-off-by: Matt Roper Signed-off-by: Daniel Vetter --- tests/kms_setmode.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/kms_setmode.c') diff --git a/tests/kms_setmode.c b/tests/kms_setmode.c index 8e6afbff..25caad9a 100644 --- a/tests/kms_setmode.c +++ b/tests/kms_setmode.c @@ -187,7 +187,7 @@ static void create_fb_for_crtc(struct crtc_config *crtc, crtc->mode.vdisplay, igt_bpp_depth_to_drm_format(bpp, depth), I915_TILING_NONE, fb_info); - igt_assert(fb_id > 0); + igt_assert_lt(0, fb_id); } static void get_mode_for_crtc(struct crtc_config *crtc, @@ -281,7 +281,7 @@ static void setup_crtcs(drmModeRes *resources, struct connector_config *cconf, unsigned long encoder_mask; int j; - igt_assert(crtc_count < MAX_CRTCS); + igt_assert_lt(crtc_count, MAX_CRTCS); crtc->crtc_idx = cconf[i].crtc_idx; drm_crtc = drmModeGetCrtc(drm_fd, -- cgit v1.2.3