summaryrefslogtreecommitdiff
path: root/tests/weston-test-client-helper.h
diff options
context:
space:
mode:
authorMarek Chalupa <mchqwerty@gmail.com>2014-07-16 11:27:06 +0200
committerPekka Paalanen <pq@iki.fi>2014-07-22 19:14:54 +0300
commit4d06d46ace7016dd6bed82bb60c56d00ac5ae4b9 (patch)
tree65fd1166c463fadbd049f9b2c4383178d1686c38 /tests/weston-test-client-helper.h
parente7d74685213a058c43c1b833447c4452e6fa858c (diff)
downloadweston-4d06d46ace7016dd6bed82bb60c56d00ac5ae4b9.tar.gz
tests: add expect_protocol_error function
This function checks if a particular protocol error came in wire. It's usefull in the cases where we hitherto used FAIL_TEST. The problem with FAIL_TEST is that *any* assert will pass the test, but we want only some asserts to pass the test (i. e. we don't want the test to pass when it, for example, can't connect to display). FAIL_TESTs are good only for sanity testing. The expect_protocol_error allows us to turn all FAIL_TESTs to TESTs as will be introduced in following patches. v2: fixed white-space error and a mistake in comment Reviewed-by: Bryce Harrington <b.harrington@samsung.com> Reviewed-by: Pekka Paalanen <ppaalanen@gmail.com>
Diffstat (limited to 'tests/weston-test-client-helper.h')
-rw-r--r--tests/weston-test-client-helper.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/weston-test-client-helper.h b/tests/weston-test-client-helper.h
index 4bfc3fac..f1546611 100644
--- a/tests/weston-test-client-helper.h
+++ b/tests/weston-test-client-helper.h
@@ -129,4 +129,8 @@ get_n_egl_buffers(struct client *client);
void
skip(const char *fmt, ...);
+void
+expect_protocol_error(struct client *client,
+ const struct wl_interface *intf, uint32_t code);
+
#endif