ecore: add tests for Ecore_Evas.
Signed-off-by: Cedric Bail <cedric.bail@samsung.com>
This commit is contained in:
parent
b3159a889c
commit
fc0d46411c
|
@ -69,6 +69,7 @@ tests/ecore/ecore_test_ecore_x.c \
|
|||
tests/ecore/ecore_test_ecore_imf.c \
|
||||
tests/ecore/ecore_test_coroutine.c \
|
||||
tests/ecore/ecore_test_timer.c \
|
||||
tests/ecore/ecore_test_ecore_evas.c \
|
||||
tests/ecore/ecore_suite.h
|
||||
|
||||
tests_ecore_ecore_suite_CPPFLAGS = \
|
||||
|
@ -80,7 +81,8 @@ tests_ecore_ecore_suite_CPPFLAGS = \
|
|||
@ECORE_CON_CFLAGS@ \
|
||||
@ECORE_FILE_CFLAGS@ \
|
||||
@ECORE_X_CFLAGS@ \
|
||||
@ECORE_IMF_CFLAGS@
|
||||
@ECORE_IMF_CFLAGS@ \
|
||||
@ECORE_EVAS_CFLAGS@
|
||||
|
||||
tests_ecore_ecore_suite_LDADD = \
|
||||
@CHECK_LIBS@ \
|
||||
|
@ -89,14 +91,16 @@ tests_ecore_ecore_suite_LDADD = \
|
|||
@USE_ECORE_CON_LIBS@ \
|
||||
@USE_ECORE_FILE_LIBS@ \
|
||||
@USE_ECORE_X_LIBS@ \
|
||||
@USE_ECORE_IMF_LIBS@
|
||||
@USE_ECORE_IMF_LIBS@ \
|
||||
@USE_ECORE_EVAS_LIBS@
|
||||
tests_ecore_ecore_suite_DEPENDENCIES = \
|
||||
@USE_ECORE_INTERNAL_LIBS@ \
|
||||
@USE_ECORE_AUDIO_INTERNAL_LIBS@ \
|
||||
@USE_ECORE_CON_INTERNAL_LIBS@ \
|
||||
@USE_ECORE_FILE_INTERNAL_LIBS@ \
|
||||
@USE_ECORE_X_INTERNAL_LIBS@ \
|
||||
@USE_ECORE_IMF_INTERNAL_LIBS@
|
||||
@USE_ECORE_IMF_INTERNAL_LIBS@ \
|
||||
@USE_ECORE_EVAS_INTERNAL_LIBS@
|
||||
|
||||
if HAVE_ECORE_AUDIO
|
||||
tests_ecore_ecore_suite_SOURCES += tests/ecore/ecore_test_ecore_audio.c
|
||||
|
|
|
@ -27,6 +27,7 @@ static const Ecore_Test_Case etc[] = {
|
|||
#endif
|
||||
{ "Ecore_Coroutine", ecore_test_coroutine },
|
||||
{ "Ecore_Timers", ecore_test_timer },
|
||||
{ "Ecore_Evas", ecore_test_ecore_evas },
|
||||
{ NULL, NULL }
|
||||
};
|
||||
|
||||
|
|
|
@ -10,5 +10,6 @@ void ecore_test_ecore_imf(TCase *tc);
|
|||
void ecore_test_ecore_audio(TCase *tc);
|
||||
void ecore_test_coroutine(TCase *tc);
|
||||
void ecore_test_timer(TCase *tc);
|
||||
void ecore_test_ecore_evas(TCase *tc);
|
||||
|
||||
#endif /* _ECORE_SUITE_H */
|
||||
|
|
|
@ -0,0 +1,42 @@
|
|||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include <Ecore_Evas.h>
|
||||
|
||||
#include "ecore_suite.h"
|
||||
|
||||
#define WINDOW_HEIGHT 200
|
||||
#define WINDOW_WIDTH 200
|
||||
|
||||
START_TEST(ecore_test_ecore_evas_associate)
|
||||
{
|
||||
Ecore_Evas *ee;
|
||||
Evas *canvas;
|
||||
Evas_Object *bg;
|
||||
int ret;
|
||||
|
||||
ret = ecore_evas_init();
|
||||
fail_if(ret == 0);
|
||||
|
||||
ee = ecore_evas_buffer_new(WINDOW_WIDTH, WINDOW_HEIGHT);
|
||||
fail_if(ee == NULL);
|
||||
|
||||
canvas = ecore_evas_get(ee);
|
||||
fail_if(ecore_evas_ecore_evas_get(canvas) != ee);
|
||||
|
||||
bg = evas_object_rectangle_add(canvas);
|
||||
ret = ecore_evas_object_associate(ee, bg, ECORE_EVAS_OBJECT_ASSOCIATE_BASE);
|
||||
fail_if(ret == 0);
|
||||
|
||||
ecore_evas_free(ee);
|
||||
|
||||
ret = ecore_evas_shutdown();
|
||||
fail_if(ret != 0);
|
||||
}
|
||||
END_TEST
|
||||
|
||||
void ecore_test_ecore_evas(TCase *tc)
|
||||
{
|
||||
tcase_add_test(tc, ecore_test_ecore_evas_associate);
|
||||
}
|
Loading…
Reference in New Issue