[PATCH 13/14] tests: test set for ivi-shell notification in bad condition with helper client
Jon A. Cruz
jonc at osg.samsung.com
Wed Jun 24 10:04:34 PDT 2015
On 06/21/2015 11:36 PM, Nobuhiko Tanibata wrote:
> From: Nobuhiko Tanibata <NOBUHIKO_TANIBATA at xddp.denso.co.jp>
>
> These tests are implemented on test suite framework, which provides
> helper client.
> Following features are tested,
> - add notfication of ivi-surface with bad condition
>
> Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA at xddp.denso.co.jp>
> Reviewed-by: Pekka Paalanen <pekka.paalanen at collabora.co.uk>
Looks good.
Reviewed-by: Jon A. Cruz <jonc at osg.samsung.com>
> ---
> tests/ivi_layout-test-plugin.c | 22 ++++++++++++++++++++++
> tests/ivi_layout-test.c | 1 +
> 2 files changed, 23 insertions(+)
>
> diff --git a/tests/ivi_layout-test-plugin.c b/tests/ivi_layout-test-plugin.c
> index 28afac9..5ac0135 100644
> --- a/tests/ivi_layout-test-plugin.c
> +++ b/tests/ivi_layout-test-plugin.c
> @@ -1049,3 +1049,25 @@ RUNNER_TEST(surface_remove_notification_p3)
> {
> runner_assert(ctx->user_flags == 0);
> }
> +
> +static void
> +test_surface_bad_properties_changed_notification_callback(struct ivi_layout_surface *ivisurf,
> + const struct ivi_layout_surface_properties *prop,
> + enum ivi_layout_notification_mask mask,
> + void *userdata)
> +{
> +}
> +
> +RUNNER_TEST(surface_bad_properties_changed_notification)
> +{
> + const struct ivi_controller_interface *ctl = ctx->controller_interface;
> + struct ivi_layout_surface *ivisurf;
> +
> + ivisurf = ctl->get_surface_from_id(IVI_TEST_SURFACE_ID(0));
> + runner_assert(ivisurf != NULL);
> +
> + runner_assert(ctl->surface_add_notification(
> + NULL, test_surface_bad_properties_changed_notification_callback, NULL) == IVI_FAILED);
> + runner_assert(ctl->surface_add_notification(
> + ivisurf, NULL, NULL) == IVI_FAILED);
> +}
> diff --git a/tests/ivi_layout-test.c b/tests/ivi_layout-test.c
> index 7091c9f..6c739da 100644
> --- a/tests/ivi_layout-test.c
> +++ b/tests/ivi_layout-test.c
> @@ -197,6 +197,7 @@ const char * const basic_test_names[] = {
> "surface_source_rectangle",
> "surface_bad_opacity",
> "surface_properties_changed_notification",
> + "surface_bad_properties_changed_notification",
> };
>
> const char * const surface_property_commit_changes_test_names[] = {
>
--
Jon A. Cruz - Senior Open Source Developer
Samsung Open Source Group
jonc at osg.samsung.com
More information about the wayland-devel
mailing list