forked from enlightenment/efl
ecore_input: Added test suite for ecore_input.
Summary: Added test suite for ecore_input with one test case. Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com> Reviewers: devilhorns Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D1602
This commit is contained in:
parent
be5b00cfd1
commit
2119e34d85
|
@ -177,6 +177,7 @@ tests/ecore/ecore_test_timer.c \
|
|||
tests/ecore/ecore_test_ecore_evas.c \
|
||||
tests/ecore/ecore_test_animator.c \
|
||||
tests/ecore/ecore_test_ecore_thread_eina_thread_queue.c \
|
||||
tests/ecore/ecore_test_ecore_input.c \
|
||||
tests/ecore/ecore_suite.h
|
||||
|
||||
tests_ecore_ecore_suite_CPPFLAGS = -I$(top_builddir)/src/lib/efl \
|
||||
|
@ -193,7 +194,8 @@ tests_ecore_ecore_suite_CPPFLAGS = -I$(top_builddir)/src/lib/efl \
|
|||
@ECORE_WAYLAND_CFLAGS@ \
|
||||
@ECORE_WAYLAND_SRV_CFLAGS@ \
|
||||
@ECORE_DRM_CFLAGS@ \
|
||||
@ECORE_FB_CFLAGS@
|
||||
@ECORE_FB_CFLAGS@ \
|
||||
@ECORE_INPUT_CFLAGS@
|
||||
|
||||
tests_ecore_ecore_suite_LDADD = \
|
||||
@CHECK_LIBS@ \
|
||||
|
@ -207,8 +209,8 @@ tests_ecore_ecore_suite_LDADD = \
|
|||
@USE_ECORE_WAYLAND_LIBS@ \
|
||||
@USE_ECORE_FB_LIBS@ \
|
||||
@ECORE_WAYLAND_SRV_LIBS@ \
|
||||
@ECORE_DRM_LIBS@
|
||||
|
||||
@ECORE_DRM_LIBS@ \
|
||||
@USE_ECORE_INPUT_LIBS@
|
||||
tests_ecore_ecore_suite_DEPENDENCIES = \
|
||||
@USE_ECORE_INTERNAL_LIBS@ \
|
||||
@USE_ECORE_AUDIO_INTERNAL_LIBS@ \
|
||||
|
@ -220,6 +222,7 @@ tests_ecore_ecore_suite_DEPENDENCIES = \
|
|||
@USE_ECORE_WAYLAND_INTERNAL_LIBS@ \
|
||||
@USE_ECORE_DRM_INTERNAL_LIBS@ \
|
||||
@USE_ECORE_FB_INTERNAL_LIBS@
|
||||
@USE_ECORE_INPUT_INTERNAL_LIBS@
|
||||
|
||||
if HAVE_ECORE_AUDIO
|
||||
tests_ecore_ecore_suite_SOURCES += tests/ecore/ecore_test_ecore_audio.c
|
||||
|
|
|
@ -39,6 +39,7 @@ static const Ecore_Test_Case etc[] = {
|
|||
#if HAVE_ECORE_FB
|
||||
{ "Ecore_Fb", ecore_test_ecore_fb },
|
||||
#endif
|
||||
{ "Ecore_Input", ecore_test_ecore_input },
|
||||
{ NULL, NULL }
|
||||
};
|
||||
|
||||
|
|
|
@ -16,5 +16,6 @@ void ecore_test_ecore_thread_eina_thread_queue(TCase *tc);
|
|||
void ecore_test_ecore_wayland(TCase *tc);
|
||||
void ecore_test_ecore_drm(TCase *tc);
|
||||
void ecore_test_ecore_fb(TCase *tc);
|
||||
void ecore_test_ecore_input(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_Input.h>
|
||||
|
||||
#include "ecore_suite.h"
|
||||
|
||||
#define MAX_ITER 10
|
||||
|
||||
START_TEST(ecore_test_ecore_input_init)
|
||||
{
|
||||
int ret, i, j;
|
||||
|
||||
for (i = 1; i <= MAX_ITER; i++)
|
||||
{
|
||||
ret = ecore_event_init();
|
||||
fprintf(stderr, "Created %d ecore input instance.\n", i);
|
||||
fail_if(ret != i);
|
||||
}
|
||||
|
||||
for (j = MAX_ITER - 1; j >= 0; j--)
|
||||
{
|
||||
ret = ecore_event_shutdown();
|
||||
fprintf(stderr, "Deleted %d ecore input instance.\n", MAX_ITER - j);
|
||||
fail_if(ret != j);
|
||||
}
|
||||
}
|
||||
END_TEST
|
||||
|
||||
void ecore_test_ecore_input(TCase *tc)
|
||||
{
|
||||
tcase_add_test(tc, ecore_test_ecore_input_init);
|
||||
}
|
Loading…
Reference in New Issue