tests: add wp_viewporter tests
These tests poke the viewporter interface to ensure proper behaviour
from client perspective, without testing the rendering result.
These cases are covered:
- create viewport twice
- source rectangle invalid value errors, and unset
- destination size invalid value errors, and unset
- source causing non-integer destination size
- source inside/outside of buffer with transform, scale
- source outside NULL buffer, then getting real buffer
- source outside NULL buffer with inherited NULL
- set_source, set_destination, and destroy after the wl_surface is
destroyed
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
diff --git a/Makefile.am b/Makefile.am
index d5f698d..8466a5f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1102,6 +1102,7 @@
button.weston \
text.weston \
presentation.weston \
+ viewporter.weston \
roles.weston \
subsurface.weston \
devices.weston
@@ -1254,6 +1255,15 @@
roles_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
roles_weston_LDADD = libtest-client.la
+viewporter_weston_SOURCES = \
+ tests/viewporter-test.c \
+ shared/helpers.h
+nodist_viewporter_weston_SOURCES = \
+ protocol/viewporter-protocol.c \
+ protocol/viewporter-client-protocol.h
+viewporter_weston_CFLAGS = $(AM_CFLAGS) $(TEST_CLIENT_CFLAGS)
+viewporter_weston_LDADD = libtest-client.la
+
if ENABLE_EGL
weston_tests += buffer-count.weston
buffer_count_weston_SOURCES = tests/buffer-count-test.c