forked from enlightenment/efl
separate the Ecore_X test from the Ecore one
SVN revision: 51533
This commit is contained in:
parent
0d89124a68
commit
bb17bf9216
|
@ -3,6 +3,7 @@ MAINTAINERCLEANFILES = Makefile.in
|
|||
AM_CPPFLAGS = \
|
||||
-I$(top_srcdir)/src/lib/ecore \
|
||||
-I$(top_srcdir)/src/lib/ecore_con \
|
||||
-I$(top_srcdir)/src/lib/ecore_x \
|
||||
@EINA_CFLAGS@ \
|
||||
@CHECK_CFLAGS@
|
||||
|
||||
|
@ -15,7 +16,8 @@ check_PROGRAMS = ecore_suite
|
|||
ecore_suite_SOURCES = \
|
||||
ecore_suite.c \
|
||||
ecore_test_ecore.c \
|
||||
ecore_test_ecore_con.c
|
||||
ecore_test_ecore_con.c \
|
||||
ecore_test_ecore_x.c
|
||||
|
||||
ecore_suite_LDADD = \
|
||||
@CHECK_LIBS@ \
|
||||
|
|
|
@ -20,6 +20,7 @@ struct _Ecore_Test_Case
|
|||
static const Ecore_Test_Case etc[] = {
|
||||
{ "Ecore", ecore_test_ecore },
|
||||
{ "Ecore_Con", ecore_test_ecore_con },
|
||||
{ "Ecore_X", ecore_test_ecore_x },
|
||||
{ NULL, NULL }
|
||||
};
|
||||
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
|
||||
void ecore_test_ecore(TCase *tc);
|
||||
void ecore_test_ecore_con(TCase *tc);
|
||||
void ecore_test_ecore_x(TCase *tc);
|
||||
|
||||
|
||||
#endif /* _ECORE_SUITE_H */
|
||||
|
|
|
@ -351,31 +351,6 @@ START_TEST(ecore_test_ecore_main_loop_event_recursive)
|
|||
}
|
||||
END_TEST
|
||||
|
||||
/* TODO: change to HAVE_ECORE_X when xcb implementation is done */
|
||||
#ifdef HAVE_ECORE_X_XLIB
|
||||
|
||||
START_TEST(ecore_test_ecore_x_bell)
|
||||
{
|
||||
int i;
|
||||
int ret;
|
||||
|
||||
ret = ecore_x_init(NULL);
|
||||
fail_if(ret != 1);
|
||||
|
||||
printf("You should hear 3 beeps now.\n");
|
||||
for (i = 0; i < 3; i++)
|
||||
{
|
||||
ret = ecore_x_bell(0);
|
||||
fail_if(ret != EINA_TRUE);
|
||||
ecore_x_sync();
|
||||
sleep(1);
|
||||
}
|
||||
ecore_x_shutdown();
|
||||
}
|
||||
END_TEST
|
||||
|
||||
#endif
|
||||
|
||||
void ecore_test_ecore(TCase *tc)
|
||||
{
|
||||
tcase_add_test(tc, ecore_test_ecore_init);
|
||||
|
@ -388,9 +363,4 @@ void ecore_test_ecore(TCase *tc)
|
|||
tcase_add_test(tc, ecore_test_ecore_main_loop_event);
|
||||
tcase_add_test(tc, ecore_test_ecore_main_loop_timer_inner);
|
||||
tcase_add_test(tc, ecore_test_ecore_main_loop_event_recursive);
|
||||
|
||||
/* TODO: change to HAVE_ECORE_X when xcb implementation is done */
|
||||
#ifdef HAVE_ECORE_X_XLIB
|
||||
tcase_add_test(tc, ecore_test_ecore_x_bell);
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -0,0 +1,56 @@
|
|||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include <Ecore_X.h>
|
||||
|
||||
#include "ecore_suite.h"
|
||||
|
||||
|
||||
/* TODO: change to HAVE_ECORE_X when xcb implementation is done */
|
||||
#ifdef HAVE_ECORE_X_XLIB
|
||||
|
||||
START_TEST(ecore_test_ecore_x_init)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = ecore_x_init(NULL);
|
||||
fail_if(ret != 1);
|
||||
|
||||
ret = ecore_x_shutdown();
|
||||
fail_if(ret != 0);
|
||||
}
|
||||
END_TEST
|
||||
|
||||
START_TEST(ecore_test_ecore_x_bell)
|
||||
{
|
||||
int i;
|
||||
int ret;
|
||||
|
||||
ret = ecore_x_init(NULL);
|
||||
fail_if(ret != 1);
|
||||
|
||||
printf("You should hear 3 beeps now.\n");
|
||||
for (i = 0; i < 3; i++)
|
||||
{
|
||||
ret = ecore_x_bell(0);
|
||||
fail_if(ret != EINA_TRUE);
|
||||
ecore_x_sync();
|
||||
sleep(1);
|
||||
}
|
||||
|
||||
ecore_x_shutdown();
|
||||
}
|
||||
END_TEST
|
||||
|
||||
#endif
|
||||
|
||||
void ecore_test_ecore_x(TCase *tc)
|
||||
{
|
||||
|
||||
/* TODO: change to HAVE_ECORE_X when xcb implementation is done */
|
||||
#ifdef HAVE_ECORE_X_XLIB
|
||||
tcase_add_test(tc, ecore_test_ecore_x_init);
|
||||
tcase_add_test(tc, ecore_test_ecore_x_bell);
|
||||
#endif
|
||||
}
|
Loading…
Reference in New Issue