diff options
author | Matt Roper <matthew.d.roper@intel.com> | 2015-03-05 15:01:00 -0800 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2015-03-06 18:06:10 +0100 |
commit | 07be8fec156ba8405f2aafa3a37fe29d06893f05 (patch) | |
tree | 0591bf1aca05c2c8f5f89bb0400d948e8a2d0fe6 /tests/kms_setmode.c | |
parent | 14a3d88a0967718124fc3b6c111a877203da025f (diff) |
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 <matthew.d.roper@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Diffstat (limited to 'tests/kms_setmode.c')
-rw-r--r-- | tests/kms_setmode.c | 4 |
1 files changed, 2 insertions, 2 deletions
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, |