diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2014-03-20 17:31:16 +0100 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2014-03-20 17:32:14 +0100 |
commit | 701a755bde7a6f4b3973ac76f4f00c8702db4c7d (patch) | |
tree | 57318772345c95add6a0cbc4d90b90a065add845 | |
parent | ba3a1a86b76d0648a341de4e86c84d2e2a515c51 (diff) |
tests/kms_cursor_crc: Review from Imre for Sagar's patch
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
-rw-r--r-- | tests/kms_cursor_crc.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/tests/kms_cursor_crc.c b/tests/kms_cursor_crc.c index 717d9ffd..7423f514 100644 --- a/tests/kms_cursor_crc.c +++ b/tests/kms_cursor_crc.c @@ -152,26 +152,26 @@ static void test_crc(test_data_t *test_data, enum cursor_type cursor_type, /* 1 pixel inside */ do_test(test_data, left - (cursor_w-1), right + (cursor_w-1), top , bottom ); - do_test(test_data, left , right , top - (cursor_h-1), bottom + (cursor_h-1)); - do_test(test_data, left - (cursor_w-1), right + (cursor_w-1), top - (cursor_h-1), bottom + (cursor_h-1)); + do_test(test_data, left , right , top - (cursor_h-1), bottom + (cursor_h-1)); + do_test(test_data, left - (cursor_w-1), right + (cursor_w-1), top - (cursor_h-1), bottom + (cursor_h-1)); } else { /* cursor offscreen, crc should always match */ test_data->crc_must_match = true; /* fully outside */ do_test(test_data, left - (cursor_w), right + (cursor_w), top , bottom ); - do_test(test_data, left , right , top - (cursor_h), bottom + (cursor_h)); - do_test(test_data, left - (cursor_w), right + (cursor_w), top - (cursor_h), bottom + (cursor_h)); + do_test(test_data, left , right , top - (cursor_h), bottom + (cursor_h)); + do_test(test_data, left - (cursor_w), right + (cursor_w), top - (cursor_h), bottom + (cursor_h)); /* fully outside by 1 extra pixels */ do_test(test_data, left - (cursor_w+1), right + (cursor_w+1), top , bottom ); - do_test(test_data, left , right , top - (cursor_h+1), bottom + (cursor_h+1)); - do_test(test_data, left - (cursor_w+1), right + (cursor_w+1), top - (cursor_h+1), bottom + (cursor_h+1)); + do_test(test_data, left , right , top - (cursor_h+1), bottom + (cursor_h+1)); + do_test(test_data, left - (cursor_w+1), right + (cursor_w+1), top - (cursor_h+1), bottom + (cursor_h+1)); /* fully outside by 2 extra pixels */ do_test(test_data, left - (cursor_w+2), right + (cursor_w+2), top , bottom ); - do_test(test_data, left , right , top - (cursor_h+2), bottom + (cursor_h+2)); - do_test(test_data, left - (cursor_w+2), right + (cursor_w+2), top - (cursor_h+2), bottom + (cursor_h+2)); + do_test(test_data, left , right , top - (cursor_h+2), bottom + (cursor_h+2)); + do_test(test_data, left - (cursor_w+2), right + (cursor_w+2), top - (cursor_h+2), bottom + (cursor_h+2)); /* fully outside by a lot of extra pixels */ do_test(test_data, left - (cursor_w+512), right + (cursor_w+512), top , bottom ); @@ -358,9 +358,8 @@ igt_main ret = drmGetCap(data.drm_fd, DRM_CAP_CURSOR_HEIGHT, &cursor_height); igt_assert(ret == 0); - fprintf(stdout, "%d, %d\n", cursor_width, cursor_height); /* We assume width and height are same so max is assigned width */ - cursor_max_size = (int)cursor_width; + igt_assert_cmpint(cursor_width, ==, cursor_height); igt_set_vt_graphics_mode(); |