forked from enlightenment/efl
ecore_wayland: Created test suit for ecore_wayland.
Summary: Created test suit for ecore_wayland and added test case for ecore_wl_init and ecore_wl_shutdown. Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com> Reviewers: devilhorns Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D1498
This commit is contained in:
parent
9b84f98e27
commit
a79adfcc69
|
@ -215,7 +215,8 @@ tests_ecore_ecore_suite_CPPFLAGS = -I$(top_builddir)/src/lib/efl \
|
|||
@ECORE_FILE_CFLAGS@ \
|
||||
@ECORE_X_CFLAGS@ \
|
||||
@ECORE_IMF_CFLAGS@ \
|
||||
@ECORE_EVAS_CFLAGS@
|
||||
@ECORE_EVAS_CFLAGS@ \
|
||||
@ECORE_WAYLAND_CFLAGS@
|
||||
|
||||
tests_ecore_ecore_suite_LDADD = \
|
||||
@CHECK_LIBS@ \
|
||||
|
@ -225,7 +226,8 @@ tests_ecore_ecore_suite_LDADD = \
|
|||
@USE_ECORE_FILE_LIBS@ \
|
||||
@USE_ECORE_X_LIBS@ \
|
||||
@USE_ECORE_IMF_LIBS@ \
|
||||
@USE_ECORE_EVAS_LIBS@
|
||||
@USE_ECORE_EVAS_LIBS@ \
|
||||
@USE_ECORE_WAYLAND_LIBS@
|
||||
tests_ecore_ecore_suite_DEPENDENCIES = \
|
||||
@USE_ECORE_INTERNAL_LIBS@ \
|
||||
@USE_ECORE_AUDIO_INTERNAL_LIBS@ \
|
||||
|
@ -233,12 +235,17 @@ tests_ecore_ecore_suite_DEPENDENCIES = \
|
|||
@USE_ECORE_FILE_INTERNAL_LIBS@ \
|
||||
@USE_ECORE_X_INTERNAL_LIBS@ \
|
||||
@USE_ECORE_IMF_INTERNAL_LIBS@ \
|
||||
@USE_ECORE_EVAS_INTERNAL_LIBS@
|
||||
@USE_ECORE_EVAS_INTERNAL_LIBS@ \
|
||||
@USE_ECORE_WAYLAND_INTERNAL_LIBS@
|
||||
|
||||
if HAVE_ECORE_AUDIO
|
||||
tests_ecore_ecore_suite_SOURCES += tests/ecore/ecore_test_ecore_audio.c
|
||||
endif
|
||||
|
||||
if HAVE_ECORE_WAYLAND
|
||||
tests_ecore_ecore_suite_SOURCES += tests/ecore/ecore_test_ecore_wayland.c
|
||||
endif
|
||||
|
||||
endif
|
||||
|
||||
EXTRA_DIST += \
|
||||
|
|
|
@ -30,6 +30,9 @@ static const Ecore_Test_Case etc[] = {
|
|||
{ "Ecore_Evas", ecore_test_ecore_evas },
|
||||
{ "Ecore_Animators", ecore_test_animator },
|
||||
{ "Ecore_Test_Ccore_Thread_Eina_Thread_Queue", ecore_test_ecore_thread_eina_thread_queue },
|
||||
#if HAVE_ECORE_WAYLAND
|
||||
{ "Ecore_Wayland", ecore_test_ecore_wayland },
|
||||
#endif
|
||||
{ NULL, NULL }
|
||||
};
|
||||
|
||||
|
|
|
@ -13,5 +13,6 @@ void ecore_test_timer(TCase *tc);
|
|||
void ecore_test_ecore_evas(TCase *tc);
|
||||
void ecore_test_animator(TCase *tc);
|
||||
void ecore_test_ecore_thread_eina_thread_queue(TCase *tc);
|
||||
void ecore_test_ecore_wayland(TCase *tc);
|
||||
|
||||
#endif /* _ECORE_SUITE_H */
|
||||
|
|
|
@ -0,0 +1,37 @@
|
|||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <Ecore_Wayland.h>
|
||||
|
||||
#include "ecore_suite.h"
|
||||
|
||||
#define MAX_ITER 15
|
||||
|
||||
START_TEST(ecore_test_ecore_wl_init)
|
||||
{
|
||||
int ret, i, j;
|
||||
|
||||
for (i = 1; i <= MAX_ITER; i++)
|
||||
{
|
||||
ret = ecore_wl_init(NULL);
|
||||
fprintf(stderr, "Created %d ecore wayland instance.\n", i);
|
||||
fail_if(ret != i);
|
||||
}
|
||||
|
||||
for (j = MAX_ITER - 1; j >= 0; j--)
|
||||
{
|
||||
ret = ecore_wl_shutdown();
|
||||
fprintf(stderr, "Deleted %d ecore wayland instance.\n", MAX_ITER - j);
|
||||
fail_if(ret != j);
|
||||
}
|
||||
}
|
||||
END_TEST
|
||||
|
||||
void ecore_test_ecore_wayland(TCase *tc)
|
||||
{
|
||||
tcase_add_test(tc, ecore_test_ecore_wl_init);
|
||||
}
|
Loading…
Reference in New Issue