tests: add buffer with height

macos/master
Dave Airlie 10 years ago
parent 2c32b28002
commit 3ec5982dc4
  1. 18
      tests/test_virgl_resource.c

@ -54,6 +54,23 @@ START_TEST(virgl_res_create_buffer)
} }
END_TEST END_TEST
/* create a buffer */
START_TEST(virgl_res_create_buffer_with_height)
{
int ret;
struct virgl_renderer_resource_create_args res;
ret = testvirgl_init_single_ctx();
ck_assert_int_eq(ret, 0);
testvirgl_init_simple_buffer(&res, 1);
res.height = 50;
ret = virgl_renderer_resource_create(&res, NULL, 0);
ck_assert_int_eq(ret, EINVAL);
testvirgl_fini_single_ctx();
}
END_TEST
/* create a 1D texture */ /* create a 1D texture */
START_TEST(virgl_res_create_1d) START_TEST(virgl_res_create_1d)
{ {
@ -255,6 +272,7 @@ Suite *virgl_init_suite(void)
tc_core = tcase_create("resource"); tc_core = tcase_create("resource");
tcase_add_test(tc_core, virgl_res_create_buffer); tcase_add_test(tc_core, virgl_res_create_buffer);
tcase_add_test(tc_core, virgl_res_create_buffer_with_height);
tcase_add_test(tc_core, virgl_res_create_1d); tcase_add_test(tc_core, virgl_res_create_1d);
tcase_add_test(tc_core, virgl_res_create_1d_with_height); tcase_add_test(tc_core, virgl_res_create_1d_with_height);
tcase_add_test(tc_core, virgl_res_create_1d_with_depth); tcase_add_test(tc_core, virgl_res_create_1d_with_depth);

Loading…
Cancel
Save