mirror of
https://gitlab.freedesktop.org/emersion/libliftoff.git
synced 2025-01-30 20:34:19 +01:00
test: add an alloc test with 3 layers
This commit is contained in:
parent
060023c6f1
commit
de8175c998
2 changed files with 30 additions and 6 deletions
|
@ -23,8 +23,9 @@ test_alloc_exe = executable(
|
|||
|
||||
alloc_tests = [
|
||||
'basic',
|
||||
'primary-nomatch',
|
||||
'primary-match',
|
||||
'simple-1x',
|
||||
'simple-1x-fail',
|
||||
'simple-3x',
|
||||
]
|
||||
|
||||
foreach name : alloc_tests
|
||||
|
|
|
@ -43,16 +43,16 @@ struct test_case {
|
|||
|
||||
static struct test_plane test_setup[] = {
|
||||
{ .type = DRM_PLANE_TYPE_PRIMARY },
|
||||
{ .type = DRM_PLANE_TYPE_OVERLAY },
|
||||
{ .type = DRM_PLANE_TYPE_OVERLAY },
|
||||
{ .type = DRM_PLANE_TYPE_CURSOR },
|
||||
{ .type = DRM_PLANE_TYPE_OVERLAY },
|
||||
{ .type = DRM_PLANE_TYPE_OVERLAY },
|
||||
};
|
||||
|
||||
static const size_t test_setup_len = sizeof(test_setup) / sizeof(test_setup[0]);
|
||||
|
||||
static struct test_case tests[] = {
|
||||
{
|
||||
.name = "primary-nomatch",
|
||||
.name = "simple-1x-fail",
|
||||
.layers = {
|
||||
{
|
||||
.width = 1920,
|
||||
|
@ -63,7 +63,7 @@ static struct test_case tests[] = {
|
|||
},
|
||||
},
|
||||
{
|
||||
.name = "primary-match",
|
||||
.name = "simple-1x",
|
||||
.layers = {
|
||||
{
|
||||
.width = 1920,
|
||||
|
@ -73,6 +73,29 @@ static struct test_case tests[] = {
|
|||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
.name = "simple-3x",
|
||||
.layers = {
|
||||
{
|
||||
.width = 1920,
|
||||
.height = 1080,
|
||||
.compat = { &test_setup[0] },
|
||||
.result = &test_setup[0],
|
||||
},
|
||||
{
|
||||
.width = 100,
|
||||
.height = 100,
|
||||
.compat = { &test_setup[1] },
|
||||
.result = &test_setup[1],
|
||||
},
|
||||
{
|
||||
.width = 100,
|
||||
.height = 100,
|
||||
.compat = { &test_setup[2] },
|
||||
.result = &test_setup[2],
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
static void run_test(struct test_layer *test_layers)
|
||||
|
|
Loading…
Add table
Reference in a new issue