summaryrefslogtreecommitdiffstats
path: root/server/tests/test_display_base.c
diff options
context:
space:
mode:
authorAlon Levy <alevy@redhat.com>2012-04-19 13:48:40 +0300
committerYonit Halperin <yhalperi@redhat.com>2012-05-03 13:09:50 +0300
commit703f32cda91db552167324c542e19ef720c474dc (patch)
treec01ac8911c6f8b3c6809e994d4f782558586e572 /server/tests/test_display_base.c
parent2f02599e6a8572a153087f49e8d4f3ac737e4eaf (diff)
downloadspice-703f32cda91db552167324c542e19ef720c474dc.tar.gz
spice-703f32cda91db552167324c542e19ef720c474dc.tar.xz
spice-703f32cda91db552167324c542e19ef720c474dc.zip
server/tests: add test_get_width/test_get_height
Diffstat (limited to 'server/tests/test_display_base.c')
-rw-r--r--server/tests/test_display_base.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/server/tests/test_display_base.c b/server/tests/test_display_base.c
index 3e051b66..4211f290 100644
--- a/server/tests/test_display_base.c
+++ b/server/tests/test_display_base.c
@@ -47,6 +47,9 @@ static void test_spice_destroy_update(SimpleSpiceUpdate *update)
free(update);
}
+static uint32_t test_width;
+static uint32_t test_height;
+
#define DEFAULT_WIDTH 640
#define DEFAULT_HEIGHT 320
@@ -320,9 +323,22 @@ static void create_primary_surface(QXLWorker *worker, uint32_t width,
surface.mem = (uint64_t)&g_primary_surface;
surface.group_id = MEM_SLOT_GROUP_ID;
+ test_width = width;
+ test_height = height;
+
qxl_worker->create_primary_surface(qxl_worker, 0, &surface);
}
+uint32_t test_get_width(void)
+{
+ return test_width;
+}
+
+uint32_t test_get_height(void)
+{
+ return test_height;
+}
+
QXLDevMemSlot slot = {
.slot_group_id = MEM_SLOT_GROUP_ID,
.slot_id = 0,