[PATCH weston v2 04/14] tests: Add surface checks

Pekka Paalanen ppaalanen at gmail.com
Fri May 15 06:55:48 PDT 2015


On Fri, 15 May 2015 01:21:49 -0700
Bryce Harrington <bryce at osg.samsung.com> wrote:

> Introduce helper routines for testing surfaces against specific
> conditions.  These allow tests to validate screen captures as displaying
> the correct rendering results.
> 
> Signed-off-by: Bryce Harrington <bryce at osg.samsung.com>
> ---
>  tests/weston-test-client-helper.c | 116 ++++++++++++++++++++++++++++++++++++++
>  tests/weston-test-client-helper.h |  15 +++++
>  2 files changed, 131 insertions(+)
> 
> diff --git a/tests/weston-test-client-helper.c b/tests/weston-test-client-helper.c
> index 080bb62..04b77d5 100644
> --- a/tests/weston-test-client-helper.c
> +++ b/tests/weston-test-client-helper.c

> +bool
> +check_surfaces_equal(const struct surface *a, const struct surface *b)
> +{
> +	int y;
> +	void *p, *q;
> +
> +	if (a == NULL || b == NULL)
> +		return false;
> +	if (a->width != b->width || a->height != a->height)

The latter compares a to a, should be a to b.


Thanks,
pq


More information about the wayland-devel mailing list