aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/ecore/src/tests
diff options
context:
space:
mode:
authorDavid Walter Seikel2012-01-04 18:41:13 +1000
committerDavid Walter Seikel2012-01-04 18:41:13 +1000
commitdd7595a3475407a7fa96a97393bae8c5220e8762 (patch)
treee341e911d7eb911a51684a7412ef7f7c7605d28e /libraries/ecore/src/tests
parentAdd the skeleton. (diff)
downloadSledjHamr-dd7595a3475407a7fa96a97393bae8c5220e8762.zip
SledjHamr-dd7595a3475407a7fa96a97393bae8c5220e8762.tar.gz
SledjHamr-dd7595a3475407a7fa96a97393bae8c5220e8762.tar.bz2
SledjHamr-dd7595a3475407a7fa96a97393bae8c5220e8762.tar.xz
Add the base Enlightenment Foundation Libraries - eina, eet, evas, ecore, embryo, and edje.
Note that embryo wont be used, but I'm not sure yet if you can build edje without it.
Diffstat (limited to 'libraries/ecore/src/tests')
-rw-r--r--libraries/ecore/src/tests/Makefile.am37
-rw-r--r--libraries/ecore/src/tests/Makefile.in767
-rw-r--r--libraries/ecore/src/tests/ecore_suite.c103
-rw-r--r--libraries/ecore/src/tests/ecore_suite.h11
-rw-r--r--libraries/ecore/src/tests/ecore_test_ecore.c367
-rw-r--r--libraries/ecore/src/tests/ecore_test_ecore_con.c258
-rw-r--r--libraries/ecore/src/tests/ecore_test_ecore_x.c56
7 files changed, 1599 insertions, 0 deletions
diff --git a/libraries/ecore/src/tests/Makefile.am b/libraries/ecore/src/tests/Makefile.am
new file mode 100644
index 0000000..bfd20d9
--- /dev/null
+++ b/libraries/ecore/src/tests/Makefile.am
@@ -0,0 +1,37 @@
1MAINTAINERCLEANFILES = Makefile.in
2
3AM_CPPFLAGS = \
4-I$(top_srcdir)/src/lib/ecore \
5-I$(top_srcdir)/src/lib/ecore_con \
6-I$(top_srcdir)/src/lib/ecore_x \
7@EINA_CFLAGS@ \
8@CHECK_CFLAGS@
9
10if EFL_ENABLE_TESTS
11
12noinst_PROGRAMS = ecore_suite
13
14check_PROGRAMS = ecore_suite
15
16ecore_suite_SOURCES = \
17ecore_suite.c \
18ecore_test_ecore.c \
19ecore_test_ecore_con.c \
20ecore_test_ecore_x.c \
21ecore_suite.h
22
23ecore_suite_LDADD = \
24@CHECK_LIBS@ \
25@EINA_LIBS@ \
26$(top_builddir)/src/lib/ecore/libecore.la \
27$(top_builddir)/src/lib/ecore_con/libecore_con.la
28
29if BUILD_ECORE_X
30ecore_suite_LDADD += \
31$(top_builddir)/src/lib/ecore_x/libecore_x.la
32endif
33
34endif
35
36clean-local:
37 rm -rf *.gcno *.gcda
diff --git a/libraries/ecore/src/tests/Makefile.in b/libraries/ecore/src/tests/Makefile.in
new file mode 100644
index 0000000..a21773c
--- /dev/null
+++ b/libraries/ecore/src/tests/Makefile.in
@@ -0,0 +1,767 @@
1# Makefile.in generated by automake 1.11.1 from Makefile.am.
2# @configure_input@
3
4# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
5# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
6# Inc.
7# This Makefile.in is free software; the Free Software Foundation
8# gives unlimited permission to copy and/or distribute it,
9# with or without modifications, as long as this notice is preserved.
10
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
13# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
14# PARTICULAR PURPOSE.
15
16@SET_MAKE@
17
18VPATH = @srcdir@
19pkgdatadir = $(datadir)/@PACKAGE@
20pkgincludedir = $(includedir)/@PACKAGE@
21pkglibdir = $(libdir)/@PACKAGE@
22pkglibexecdir = $(libexecdir)/@PACKAGE@
23am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
24install_sh_DATA = $(install_sh) -c -m 644
25install_sh_PROGRAM = $(install_sh) -c
26install_sh_SCRIPT = $(install_sh) -c
27INSTALL_HEADER = $(INSTALL_DATA)
28transform = $(program_transform_name)
29NORMAL_INSTALL = :
30PRE_INSTALL = :
31POST_INSTALL = :
32NORMAL_UNINSTALL = :
33PRE_UNINSTALL = :
34POST_UNINSTALL = :
35build_triplet = @build@
36host_triplet = @host@
37@EFL_ENABLE_TESTS_TRUE@noinst_PROGRAMS = ecore_suite$(EXEEXT)
38@EFL_ENABLE_TESTS_TRUE@check_PROGRAMS = ecore_suite$(EXEEXT)
39@BUILD_ECORE_X_TRUE@@EFL_ENABLE_TESTS_TRUE@am__append_1 = \
40@BUILD_ECORE_X_TRUE@@EFL_ENABLE_TESTS_TRUE@$(top_builddir)/src/lib/ecore_x/libecore_x.la
41
42subdir = src/tests
43DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
44ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
45am__aclocal_m4_deps = $(top_srcdir)/m4/ac_attribute.m4 \
46 $(top_srcdir)/m4/ac_path_generic.m4 \
47 $(top_srcdir)/m4/check_x_extension.m4 \
48 $(top_srcdir)/m4/ecore_check_module.m4 \
49 $(top_srcdir)/m4/ecore_check_options.m4 \
50 $(top_srcdir)/m4/efl_compiler_flag.m4 \
51 $(top_srcdir)/m4/efl_doxygen.m4 \
52 $(top_srcdir)/m4/efl_examples.m4 \
53 $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \
54 $(top_srcdir)/m4/efl_threads.m4 $(top_srcdir)/m4/gettext.m4 \
55 $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \
56 $(top_srcdir)/m4/isc-posix.m4 $(top_srcdir)/m4/lib-ld.m4 \
57 $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
58 $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
59 $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
60 $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \
61 $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \
62 $(top_srcdir)/configure.ac
63am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
64 $(ACLOCAL_M4)
65mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
66CONFIG_HEADER = $(top_builddir)/config.h
67CONFIG_CLEAN_FILES =
68CONFIG_CLEAN_VPATH_FILES =
69PROGRAMS = $(noinst_PROGRAMS)
70am__ecore_suite_SOURCES_DIST = ecore_suite.c ecore_test_ecore.c \
71 ecore_test_ecore_con.c ecore_test_ecore_x.c ecore_suite.h
72@EFL_ENABLE_TESTS_TRUE@am_ecore_suite_OBJECTS = ecore_suite.$(OBJEXT) \
73@EFL_ENABLE_TESTS_TRUE@ ecore_test_ecore.$(OBJEXT) \
74@EFL_ENABLE_TESTS_TRUE@ ecore_test_ecore_con.$(OBJEXT) \
75@EFL_ENABLE_TESTS_TRUE@ ecore_test_ecore_x.$(OBJEXT)
76ecore_suite_OBJECTS = $(am_ecore_suite_OBJECTS)
77@EFL_ENABLE_TESTS_TRUE@ecore_suite_DEPENDENCIES = $(top_builddir)/src/lib/ecore/libecore.la \
78@EFL_ENABLE_TESTS_TRUE@ $(top_builddir)/src/lib/ecore_con/libecore_con.la \
79@EFL_ENABLE_TESTS_TRUE@ $(am__append_1)
80AM_V_lt = $(am__v_lt_$(V))
81am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
82am__v_lt_0 = --silent
83DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
84depcomp = $(SHELL) $(top_srcdir)/depcomp
85am__depfiles_maybe = depfiles
86am__mv = mv -f
87COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
88 $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
89LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
90 $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
91 $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
92 $(AM_CFLAGS) $(CFLAGS)
93AM_V_CC = $(am__v_CC_$(V))
94am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
95am__v_CC_0 = @echo " CC " $@;
96AM_V_at = $(am__v_at_$(V))
97am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
98am__v_at_0 = @
99CCLD = $(CC)
100LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
101 $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
102 $(AM_LDFLAGS) $(LDFLAGS) -o $@
103AM_V_CCLD = $(am__v_CCLD_$(V))
104am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
105am__v_CCLD_0 = @echo " CCLD " $@;
106AM_V_GEN = $(am__v_GEN_$(V))
107am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
108am__v_GEN_0 = @echo " GEN " $@;
109SOURCES = $(ecore_suite_SOURCES)
110DIST_SOURCES = $(am__ecore_suite_SOURCES_DIST)
111ETAGS = etags
112CTAGS = ctags
113DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
114ACLOCAL = @ACLOCAL@
115ALLOCA = @ALLOCA@
116AMTAR = @AMTAR@
117AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
118AR = @AR@
119AS = @AS@
120AUTOCONF = @AUTOCONF@
121AUTOHEADER = @AUTOHEADER@
122AUTOMAKE = @AUTOMAKE@
123AWK = @AWK@
124CARES_CFLAGS = @CARES_CFLAGS@
125CARES_LIBS = @CARES_LIBS@
126CC = @CC@
127CCDEPMODE = @CCDEPMODE@
128CFLAGS = @CFLAGS@
129CHECK_CFLAGS = @CHECK_CFLAGS@
130CHECK_LIBS = @CHECK_LIBS@
131CPP = @CPP@
132CPPFLAGS = @CPPFLAGS@
133CURL_CFLAGS = @CURL_CFLAGS@
134CURL_LIBS = @CURL_LIBS@
135CXX = @CXX@
136CXXCPP = @CXXCPP@
137CXXDEPMODE = @CXXDEPMODE@
138CXXFLAGS = @CXXFLAGS@
139CYGPATH_W = @CYGPATH_W@
140DEFS = @DEFS@
141DEPDIR = @DEPDIR@
142DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@
143DIRECTFB_LIBS = @DIRECTFB_LIBS@
144DLLTOOL = @DLLTOOL@
145DSYMUTIL = @DSYMUTIL@
146DUMPBIN = @DUMPBIN@
147ECHO_C = @ECHO_C@
148ECHO_N = @ECHO_N@
149ECHO_T = @ECHO_T@
150ECORE_XCB_CFLAGS = @ECORE_XCB_CFLAGS@
151ECORE_XCB_LIBS = @ECORE_XCB_LIBS@
152EFL_ECORE_BUILD = @EFL_ECORE_BUILD@
153EFL_ECORE_CON_BUILD = @EFL_ECORE_CON_BUILD@
154EFL_ECORE_EVAS_BUILD = @EFL_ECORE_EVAS_BUILD@
155EFL_ECORE_FILE_BUILD = @EFL_ECORE_FILE_BUILD@
156EFL_ECORE_IMF_BUILD = @EFL_ECORE_IMF_BUILD@
157EFL_ECORE_IMF_EVAS_BUILD = @EFL_ECORE_IMF_EVAS_BUILD@
158EFL_ECORE_INPUT_BUILD = @EFL_ECORE_INPUT_BUILD@
159EFL_ECORE_INPUT_EVAS_BUILD = @EFL_ECORE_INPUT_EVAS_BUILD@
160EFL_ECORE_IPC_BUILD = @EFL_ECORE_IPC_BUILD@
161EFL_ECORE_PSL1GHT_BUILD = @EFL_ECORE_PSL1GHT_BUILD@
162EFL_ECORE_SDL_BUILD = @EFL_ECORE_SDL_BUILD@
163EFL_ECORE_WIN32_BUILD = @EFL_ECORE_WIN32_BUILD@
164EFL_ECORE_WINCE_BUILD = @EFL_ECORE_WINCE_BUILD@
165EFL_PTHREAD_CFLAGS = @EFL_PTHREAD_CFLAGS@
166EFL_PTHREAD_LIBS = @EFL_PTHREAD_LIBS@
167EGREP = @EGREP@
168EINA_CFLAGS = @EINA_CFLAGS@
169EINA_LIBS = @EINA_LIBS@
170ESCAPE_CFLAGS = @ESCAPE_CFLAGS@
171ESCAPE_LIBS = @ESCAPE_LIBS@
172EVAS_CFLAGS = @EVAS_CFLAGS@
173EVAS_LIBS = @EVAS_LIBS@
174EVIL_CFLAGS = @EVIL_CFLAGS@
175EVIL_LIBS = @EVIL_LIBS@
176EXEEXT = @EXEEXT@
177FGREP = @FGREP@
178GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
179GLIB_CFLAGS = @GLIB_CFLAGS@
180GLIB_LIBS = @GLIB_LIBS@
181GMSGFMT = @GMSGFMT@
182GMSGFMT_015 = @GMSGFMT_015@
183GREP = @GREP@
184INSTALL = @INSTALL@
185INSTALL_DATA = @INSTALL_DATA@
186INSTALL_PROGRAM = @INSTALL_PROGRAM@
187INSTALL_SCRIPT = @INSTALL_SCRIPT@
188INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
189INTLLIBS = @INTLLIBS@
190INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
191KEYSYMDEFS = @KEYSYMDEFS@
192LD = @LD@
193LDFLAGS = @LDFLAGS@
194LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
195LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
196LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@
197LIBICONV = @LIBICONV@
198LIBINTL = @LIBINTL@
199LIBOBJS = @LIBOBJS@
200LIBS = @LIBS@
201LIBTOOL = @LIBTOOL@
202LIPO = @LIPO@
203LN_S = @LN_S@
204LTLIBICONV = @LTLIBICONV@
205LTLIBINTL = @LTLIBINTL@
206LTLIBOBJS = @LTLIBOBJS@
207MAKEINFO = @MAKEINFO@
208MKDIR_P = @MKDIR_P@
209MSGFMT = @MSGFMT@
210MSGFMT_015 = @MSGFMT_015@
211MSGMERGE = @MSGMERGE@
212NM = @NM@
213NMEDIT = @NMEDIT@
214OBJC = @OBJC@
215OBJCDEPMODE = @OBJCDEPMODE@
216OBJCFLAGS = @OBJCFLAGS@
217OBJDUMP = @OBJDUMP@
218OBJEXT = @OBJEXT@
219OTOOL = @OTOOL@
220OTOOL64 = @OTOOL64@
221PACKAGE = @PACKAGE@
222PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
223PACKAGE_NAME = @PACKAGE_NAME@
224PACKAGE_STRING = @PACKAGE_STRING@
225PACKAGE_TARNAME = @PACKAGE_TARNAME@
226PACKAGE_URL = @PACKAGE_URL@
227PACKAGE_VERSION = @PACKAGE_VERSION@
228PATH_SEPARATOR = @PATH_SEPARATOR@
229PIXMAN_CFLAGS = @PIXMAN_CFLAGS@
230PIXMAN_LIBS = @PIXMAN_LIBS@
231PKG_CONFIG = @PKG_CONFIG@
232PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
233PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
234POSUB = @POSUB@
235RANLIB = @RANLIB@
236SDL_CFLAGS = @SDL_CFLAGS@
237SDL_CONFIG = @SDL_CONFIG@
238SDL_LIBS = @SDL_LIBS@
239SED = @SED@
240SET_MAKE = @SET_MAKE@
241SHELL = @SHELL@
242SSL_CFLAGS = @SSL_CFLAGS@
243SSL_LIBS = @SSL_LIBS@
244STRIP = @STRIP@
245TLS2_CFLAGS = @TLS2_CFLAGS@
246TLS2_LIBS = @TLS2_LIBS@
247TLS_CFLAGS = @TLS_CFLAGS@
248TLS_LIBS = @TLS_LIBS@
249TSLIB_CFLAGS = @TSLIB_CFLAGS@
250TSLIB_LIBS = @TSLIB_LIBS@
251USE_NLS = @USE_NLS@
252VERSION = @VERSION@
253VMAJ = @VMAJ@
254WIN32_CFLAGS = @WIN32_CFLAGS@
255WIN32_CPPFLAGS = @WIN32_CPPFLAGS@
256WIN32_LIBS = @WIN32_LIBS@
257XCB_COMPOSITE_CFLAGS = @XCB_COMPOSITE_CFLAGS@
258XCB_COMPOSITE_LIBS = @XCB_COMPOSITE_LIBS@
259XCB_CURSOR_CFLAGS = @XCB_CURSOR_CFLAGS@
260XCB_CURSOR_LIBS = @XCB_CURSOR_LIBS@
261XCB_DAMAGE_CFLAGS = @XCB_DAMAGE_CFLAGS@
262XCB_DAMAGE_LIBS = @XCB_DAMAGE_LIBS@
263XCB_DPMS_CFLAGS = @XCB_DPMS_CFLAGS@
264XCB_DPMS_LIBS = @XCB_DPMS_LIBS@
265XCB_RANDR_CFLAGS = @XCB_RANDR_CFLAGS@
266XCB_RANDR_LIBS = @XCB_RANDR_LIBS@
267XCB_RENDER_CFLAGS = @XCB_RENDER_CFLAGS@
268XCB_RENDER_LIBS = @XCB_RENDER_LIBS@
269XCB_SCREENSAVER_CFLAGS = @XCB_SCREENSAVER_CFLAGS@
270XCB_SCREENSAVER_LIBS = @XCB_SCREENSAVER_LIBS@
271XCB_SHAPE_CFLAGS = @XCB_SHAPE_CFLAGS@
272XCB_SHAPE_LIBS = @XCB_SHAPE_LIBS@
273XCB_SYNC_CFLAGS = @XCB_SYNC_CFLAGS@
274XCB_SYNC_LIBS = @XCB_SYNC_LIBS@
275XCB_X11_CFLAGS = @XCB_X11_CFLAGS@
276XCB_X11_LIBS = @XCB_X11_LIBS@
277XCB_XFIXES_CFLAGS = @XCB_XFIXES_CFLAGS@
278XCB_XFIXES_LIBS = @XCB_XFIXES_LIBS@
279XCB_XGESTURE_CFLAGS = @XCB_XGESTURE_CFLAGS@
280XCB_XGESTURE_LIBS = @XCB_XGESTURE_LIBS@
281XCB_XINERAMA_CFLAGS = @XCB_XINERAMA_CFLAGS@
282XCB_XINERAMA_LIBS = @XCB_XINERAMA_LIBS@
283XCB_XINPUT_CFLAGS = @XCB_XINPUT_CFLAGS@
284XCB_XINPUT_LIBS = @XCB_XINPUT_LIBS@
285XCB_XPRINT_CFLAGS = @XCB_XPRINT_CFLAGS@
286XCB_XPRINT_LIBS = @XCB_XPRINT_LIBS@
287XCB_XTEST_CFLAGS = @XCB_XTEST_CFLAGS@
288XCB_XTEST_LIBS = @XCB_XTEST_LIBS@
289XCOMPOSITE_CFLAGS = @XCOMPOSITE_CFLAGS@
290XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@
291XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@
292XDAMAGE_LIBS = @XDAMAGE_LIBS@
293XDPMS_CFLAGS = @XDPMS_CFLAGS@
294XDPMS_LIBS = @XDPMS_LIBS@
295XFIXES_CFLAGS = @XFIXES_CFLAGS@
296XFIXES_LIBS = @XFIXES_LIBS@
297XGESTURE_CFLAGS = @XGESTURE_CFLAGS@
298XGESTURE_LIBS = @XGESTURE_LIBS@
299XGETTEXT = @XGETTEXT@
300XGETTEXT_015 = @XGETTEXT_015@
301XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
302XI2_CFLAGS = @XI2_CFLAGS@
303XI2_LIBS = @XI2_LIBS@
304XINERAMA_CFLAGS = @XINERAMA_CFLAGS@
305XINERAMA_LIBS = @XINERAMA_LIBS@
306XKB_CFLAGS = @XKB_CFLAGS@
307XKB_LIBS = @XKB_LIBS@
308XMKMF = @XMKMF@
309XPRINT_CFLAGS = @XPRINT_CFLAGS@
310XPRINT_LIBS = @XPRINT_LIBS@
311XRANDR_CFLAGS = @XRANDR_CFLAGS@
312XRANDR_LIBS = @XRANDR_LIBS@
313XRENDER_CFLAGS = @XRENDER_CFLAGS@
314XRENDER_LIBS = @XRENDER_LIBS@
315XSS_CFLAGS = @XSS_CFLAGS@
316XSS_LIBS = @XSS_LIBS@
317XTEST_CFLAGS = @XTEST_CFLAGS@
318XTEST_LIBS = @XTEST_LIBS@
319X_CFLAGS = @X_CFLAGS@
320X_EXTRA_LIBS = @X_EXTRA_LIBS@
321X_LIBS = @X_LIBS@
322X_PRE_LIBS = @X_PRE_LIBS@
323Xcursor_cflags = @Xcursor_cflags@
324Xcursor_libs = @Xcursor_libs@
325abs_builddir = @abs_builddir@
326abs_srcdir = @abs_srcdir@
327abs_top_builddir = @abs_top_builddir@
328abs_top_srcdir = @abs_top_srcdir@
329ac_ct_CC = @ac_ct_CC@
330ac_ct_CXX = @ac_ct_CXX@
331ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
332ac_ct_OBJC = @ac_ct_OBJC@
333am__include = @am__include@
334am__leading_dot = @am__leading_dot@
335am__quote = @am__quote@
336am__tar = @am__tar@
337am__untar = @am__untar@
338bindir = @bindir@
339build = @build@
340build_alias = @build_alias@
341build_cpu = @build_cpu@
342build_os = @build_os@
343build_vendor = @build_vendor@
344builddir = @builddir@
345cocoa_ldflags = @cocoa_ldflags@
346datadir = @datadir@
347datarootdir = @datarootdir@
348dlopen_libs = @dlopen_libs@
349docdir = @docdir@
350dvidir = @dvidir@
351ecore_cocoa_cflags = @ecore_cocoa_cflags@
352ecore_cocoa_libs = @ecore_cocoa_libs@
353ecore_con_cflags = @ecore_con_cflags@
354ecore_con_libs = @ecore_con_libs@
355ecore_directfb_cflags = @ecore_directfb_cflags@
356ecore_directfb_libs = @ecore_directfb_libs@
357ecore_evas_cflags = @ecore_evas_cflags@
358ecore_evas_libs = @ecore_evas_libs@
359ecore_fb_cflags = @ecore_fb_cflags@
360ecore_fb_libs = @ecore_fb_libs@
361ecore_file_cflags = @ecore_file_cflags@
362ecore_file_libs = @ecore_file_libs@
363ecore_imf_cflags = @ecore_imf_cflags@
364ecore_imf_evas_cflags = @ecore_imf_evas_cflags@
365ecore_imf_evas_libs = @ecore_imf_evas_libs@
366ecore_imf_libs = @ecore_imf_libs@
367ecore_imf_xim_cflags = @ecore_imf_xim_cflags@
368ecore_imf_xim_libs = @ecore_imf_xim_libs@
369ecore_input_cflags = @ecore_input_cflags@
370ecore_input_evas_cflags = @ecore_input_evas_cflags@
371ecore_input_evas_libs = @ecore_input_evas_libs@
372ecore_input_libs = @ecore_input_libs@
373ecore_ipc_cflags = @ecore_ipc_cflags@
374ecore_ipc_libs = @ecore_ipc_libs@
375ecore_psl1ght_cflags = @ecore_psl1ght_cflags@
376ecore_psl1ght_libs = @ecore_psl1ght_libs@
377ecore_sdl_cflags = @ecore_sdl_cflags@
378ecore_sdl_libs = @ecore_sdl_libs@
379ecore_win32_cflags = @ecore_win32_cflags@
380ecore_win32_libs = @ecore_win32_libs@
381ecore_wince_cflags = @ecore_wince_cflags@
382ecore_wince_libs = @ecore_wince_libs@
383ecore_x_cflags = @ecore_x_cflags@
384ecore_x_libs = @ecore_x_libs@
385ecore_x_libs_private = @ecore_x_libs_private@
386efl_doxygen = @efl_doxygen@
387efl_have_doxygen = @efl_have_doxygen@
388exec_prefix = @exec_prefix@
389have_ecore_x_xcb_define = @have_ecore_x_xcb_define@
390host = @host@
391host_alias = @host_alias@
392host_cpu = @host_cpu@
393host_os = @host_os@
394host_vendor = @host_vendor@
395htmldir = @htmldir@
396includedir = @includedir@
397infodir = @infodir@
398install_sh = @install_sh@
399libdir = @libdir@
400libexecdir = @libexecdir@
401localedir = @localedir@
402localstatedir = @localstatedir@
403lt_ECHO = @lt_ECHO@
404lt_enable_auto_import = @lt_enable_auto_import@
405mandir = @mandir@
406mkdir_p = @mkdir_p@
407oldincludedir = @oldincludedir@
408pdfdir = @pdfdir@
409pkgconfig_requires_private = @pkgconfig_requires_private@
410prefix = @prefix@
411program_transform_name = @program_transform_name@
412psdir = @psdir@
413release_info = @release_info@
414requirements_ecore = @requirements_ecore@
415requirements_ecore_cocoa = @requirements_ecore_cocoa@
416requirements_ecore_con = @requirements_ecore_con@
417requirements_ecore_directfb = @requirements_ecore_directfb@
418requirements_ecore_evas = @requirements_ecore_evas@
419requirements_ecore_fb = @requirements_ecore_fb@
420requirements_ecore_file = @requirements_ecore_file@
421requirements_ecore_imf = @requirements_ecore_imf@
422requirements_ecore_imf_evas = @requirements_ecore_imf_evas@
423requirements_ecore_imf_xim = @requirements_ecore_imf_xim@
424requirements_ecore_input = @requirements_ecore_input@
425requirements_ecore_input_evas = @requirements_ecore_input_evas@
426requirements_ecore_ipc = @requirements_ecore_ipc@
427requirements_ecore_psl1ght = @requirements_ecore_psl1ght@
428requirements_ecore_sdl = @requirements_ecore_sdl@
429requirements_ecore_win32 = @requirements_ecore_win32@
430requirements_ecore_wince = @requirements_ecore_wince@
431requirements_ecore_x = @requirements_ecore_x@
432rt_libs = @rt_libs@
433sbindir = @sbindir@
434sharedstatedir = @sharedstatedir@
435srcdir = @srcdir@
436sysconfdir = @sysconfdir@
437target_alias = @target_alias@
438top_build_prefix = @top_build_prefix@
439top_builddir = @top_builddir@
440top_srcdir = @top_srcdir@
441version_info = @version_info@
442x_cflags = @x_cflags@
443x_includes = @x_includes@
444x_libs = @x_libs@
445MAINTAINERCLEANFILES = Makefile.in
446AM_CPPFLAGS = \
447-I$(top_srcdir)/src/lib/ecore \
448-I$(top_srcdir)/src/lib/ecore_con \
449-I$(top_srcdir)/src/lib/ecore_x \
450@EINA_CFLAGS@ \
451@CHECK_CFLAGS@
452
453@EFL_ENABLE_TESTS_TRUE@ecore_suite_SOURCES = \
454@EFL_ENABLE_TESTS_TRUE@ecore_suite.c \
455@EFL_ENABLE_TESTS_TRUE@ecore_test_ecore.c \
456@EFL_ENABLE_TESTS_TRUE@ecore_test_ecore_con.c \
457@EFL_ENABLE_TESTS_TRUE@ecore_test_ecore_x.c \
458@EFL_ENABLE_TESTS_TRUE@ecore_suite.h
459
460@EFL_ENABLE_TESTS_TRUE@ecore_suite_LDADD = @CHECK_LIBS@ @EINA_LIBS@ \
461@EFL_ENABLE_TESTS_TRUE@ $(top_builddir)/src/lib/ecore/libecore.la \
462@EFL_ENABLE_TESTS_TRUE@ $(top_builddir)/src/lib/ecore_con/libecore_con.la \
463@EFL_ENABLE_TESTS_TRUE@ $(am__append_1)
464all: all-am
465
466.SUFFIXES:
467.SUFFIXES: .c .lo .o .obj
468$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
469 @for dep in $?; do \
470 case '$(am__configure_deps)' in \
471 *$$dep*) \
472 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
473 && { if test -f $@; then exit 0; else break; fi; }; \
474 exit 1;; \
475 esac; \
476 done; \
477 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/tests/Makefile'; \
478 $(am__cd) $(top_srcdir) && \
479 $(AUTOMAKE) --gnu src/tests/Makefile
480.PRECIOUS: Makefile
481Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
482 @case '$?' in \
483 *config.status*) \
484 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
485 *) \
486 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
487 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
488 esac;
489
490$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
491 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
492
493$(top_srcdir)/configure: $(am__configure_deps)
494 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
495$(ACLOCAL_M4): $(am__aclocal_m4_deps)
496 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
497$(am__aclocal_m4_deps):
498
499clean-checkPROGRAMS:
500 @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \
501 echo " rm -f" $$list; \
502 rm -f $$list || exit $$?; \
503 test -n "$(EXEEXT)" || exit 0; \
504 list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
505 echo " rm -f" $$list; \
506 rm -f $$list
507
508clean-noinstPROGRAMS:
509 @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \
510 echo " rm -f" $$list; \
511 rm -f $$list || exit $$?; \
512 test -n "$(EXEEXT)" || exit 0; \
513 list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
514 echo " rm -f" $$list; \
515 rm -f $$list
516ecore_suite$(EXEEXT): $(ecore_suite_OBJECTS) $(ecore_suite_DEPENDENCIES)
517 @rm -f ecore_suite$(EXEEXT)
518 $(AM_V_CCLD)$(LINK) $(ecore_suite_OBJECTS) $(ecore_suite_LDADD) $(LIBS)
519
520mostlyclean-compile:
521 -rm -f *.$(OBJEXT)
522
523distclean-compile:
524 -rm -f *.tab.c
525
526@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ecore_suite.Po@am__quote@
527@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ecore_test_ecore.Po@am__quote@
528@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ecore_test_ecore_con.Po@am__quote@
529@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ecore_test_ecore_x.Po@am__quote@
530
531.c.o:
532@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
533@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
534@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
535@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
536@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
537@am__fastdepCC_FALSE@ $(COMPILE) -c $<
538
539.c.obj:
540@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
541@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
542@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
543@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
544@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
545@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
546
547.c.lo:
548@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
549@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
550@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
551@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
552@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
553@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
554
555mostlyclean-libtool:
556 -rm -f *.lo
557
558clean-libtool:
559 -rm -rf .libs _libs
560
561ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
562 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
563 unique=`for i in $$list; do \
564 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
565 done | \
566 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
567 END { if (nonempty) { for (i in files) print i; }; }'`; \
568 mkid -fID $$unique
569tags: TAGS
570
571TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
572 $(TAGS_FILES) $(LISP)
573 set x; \
574 here=`pwd`; \
575 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
576 unique=`for i in $$list; do \
577 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
578 done | \
579 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
580 END { if (nonempty) { for (i in files) print i; }; }'`; \
581 shift; \
582 if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
583 test -n "$$unique" || unique=$$empty_fix; \
584 if test $$# -gt 0; then \
585 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
586 "$$@" $$unique; \
587 else \
588 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
589 $$unique; \
590 fi; \
591 fi
592ctags: CTAGS
593CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
594 $(TAGS_FILES) $(LISP)
595 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
596 unique=`for i in $$list; do \
597 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
598 done | \
599 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
600 END { if (nonempty) { for (i in files) print i; }; }'`; \
601 test -z "$(CTAGS_ARGS)$$unique" \
602 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
603 $$unique
604
605GTAGS:
606 here=`$(am__cd) $(top_builddir) && pwd` \
607 && $(am__cd) $(top_srcdir) \
608 && gtags -i $(GTAGS_ARGS) "$$here"
609
610distclean-tags:
611 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
612
613distdir: $(DISTFILES)
614 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
615 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
616 list='$(DISTFILES)'; \
617 dist_files=`for file in $$list; do echo $$file; done | \
618 sed -e "s|^$$srcdirstrip/||;t" \
619 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
620 case $$dist_files in \
621 */*) $(MKDIR_P) `echo "$$dist_files" | \
622 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
623 sort -u` ;; \
624 esac; \
625 for file in $$dist_files; do \
626 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
627 if test -d $$d/$$file; then \
628 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
629 if test -d "$(distdir)/$$file"; then \
630 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
631 fi; \
632 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
633 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
634 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
635 fi; \
636 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
637 else \
638 test -f "$(distdir)/$$file" \
639 || cp -p $$d/$$file "$(distdir)/$$file" \
640 || exit 1; \
641 fi; \
642 done
643check-am: all-am
644 $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS)
645check: check-am
646all-am: Makefile $(PROGRAMS)
647installdirs:
648install: install-am
649install-exec: install-exec-am
650install-data: install-data-am
651uninstall: uninstall-am
652
653install-am: all-am
654 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
655
656installcheck: installcheck-am
657install-strip:
658 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
659 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
660 `test -z '$(STRIP)' || \
661 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
662mostlyclean-generic:
663
664clean-generic:
665
666distclean-generic:
667 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
668 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
669
670maintainer-clean-generic:
671 @echo "This command is intended for maintainers to use"
672 @echo "it deletes files that may require special tools to rebuild."
673 -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
674clean: clean-am
675
676clean-am: clean-checkPROGRAMS clean-generic clean-libtool clean-local \
677 clean-noinstPROGRAMS mostlyclean-am
678
679distclean: distclean-am
680 -rm -rf ./$(DEPDIR)
681 -rm -f Makefile
682distclean-am: clean-am distclean-compile distclean-generic \
683 distclean-tags
684
685dvi: dvi-am
686
687dvi-am:
688
689html: html-am
690
691html-am:
692
693info: info-am
694
695info-am:
696
697install-data-am:
698
699install-dvi: install-dvi-am
700
701install-dvi-am:
702
703install-exec-am:
704
705install-html: install-html-am
706
707install-html-am:
708
709install-info: install-info-am
710
711install-info-am:
712
713install-man:
714
715install-pdf: install-pdf-am
716
717install-pdf-am:
718
719install-ps: install-ps-am
720
721install-ps-am:
722
723installcheck-am:
724
725maintainer-clean: maintainer-clean-am
726 -rm -rf ./$(DEPDIR)
727 -rm -f Makefile
728maintainer-clean-am: distclean-am maintainer-clean-generic
729
730mostlyclean: mostlyclean-am
731
732mostlyclean-am: mostlyclean-compile mostlyclean-generic \
733 mostlyclean-libtool
734
735pdf: pdf-am
736
737pdf-am:
738
739ps: ps-am
740
741ps-am:
742
743uninstall-am:
744
745.MAKE: check-am install-am install-strip
746
747.PHONY: CTAGS GTAGS all all-am check check-am clean \
748 clean-checkPROGRAMS clean-generic clean-libtool clean-local \
749 clean-noinstPROGRAMS ctags distclean distclean-compile \
750 distclean-generic distclean-libtool distclean-tags distdir dvi \
751 dvi-am html html-am info info-am install install-am \
752 install-data install-data-am install-dvi install-dvi-am \
753 install-exec install-exec-am install-html install-html-am \
754 install-info install-info-am install-man install-pdf \
755 install-pdf-am install-ps install-ps-am install-strip \
756 installcheck installcheck-am installdirs maintainer-clean \
757 maintainer-clean-generic mostlyclean mostlyclean-compile \
758 mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
759 tags uninstall uninstall-am
760
761
762clean-local:
763 rm -rf *.gcno *.gcda
764
765# Tell versions [3.59,3.63) of GNU make to not export all variables.
766# Otherwise a system limit (for SysV at least) may be exceeded.
767.NOEXPORT:
diff --git a/libraries/ecore/src/tests/ecore_suite.c b/libraries/ecore/src/tests/ecore_suite.c
new file mode 100644
index 0000000..fd51750
--- /dev/null
+++ b/libraries/ecore/src/tests/ecore_suite.c
@@ -0,0 +1,103 @@
1#ifdef HAVE_CONFIG_H
2# include <config.h>
3#endif
4
5#include <stdlib.h>
6#include <stdio.h>
7
8#include <Ecore.h>
9
10#include "ecore_suite.h"
11
12typedef struct _Ecore_Test_Case Ecore_Test_Case;
13
14struct _Ecore_Test_Case
15{
16 const char *test_case;
17 void (*build)(TCase *tc);
18};
19
20static const Ecore_Test_Case etc[] = {
21 { "Ecore", ecore_test_ecore },
22 { "Ecore_Con", ecore_test_ecore_con },
23 { "Ecore_X", ecore_test_ecore_x },
24 { NULL, NULL }
25};
26
27static void
28_list_tests(void)
29{
30 const Ecore_Test_Case *itr;
31
32 itr = etc;
33 fputs("Available Test Cases:\n", stderr);
34 for (; itr->test_case; itr++)
35 fprintf(stderr, "\t%s\n", itr->test_case);
36}
37static Eina_Bool
38_use_test(int argc, const char **argv, const char *test_case)
39{
40 if (argc < 1)
41 return 1;
42
43 for (; argc > 0; argc--, argv++)
44 if (strcmp(test_case, *argv) == 0)
45 return 1;
46 return 0;
47}
48
49static Suite *
50ecore_suite_build(int argc, const char **argv)
51{
52 TCase *tc;
53 Suite *s;
54 int i;
55
56 s = suite_create("Ecore");
57
58 for (i = 0; etc[i].test_case; ++i)
59 {
60 if (!_use_test(argc, argv, etc[i].test_case)) continue;
61 tc = tcase_create(etc[i].test_case);
62
63 etc[i].build(tc);
64
65 suite_add_tcase(s, tc);
66 tcase_set_timeout(tc, 0);
67 }
68
69 return s;
70}
71
72int
73main(int argc, char **argv)
74{
75 Suite *s;
76 SRunner *sr;
77 int i, failed_count;
78
79 for (i = 1; i < argc; i++)
80 if ((strcmp(argv[i], "-h") == 0) ||
81 (strcmp(argv[i], "--help") == 0))
82 {
83 fprintf(stderr, "Usage:\n\t%s [test_case1 .. [test_caseN]]\n",
84 argv[0]);
85 _list_tests();
86 return 0;
87 }
88 else if ((strcmp(argv[i], "-l") == 0) ||
89 (strcmp(argv[i], "--list") == 0))
90 {
91 _list_tests();
92 return 0;
93 }
94
95 s = ecore_suite_build(argc - 1, (const char **)argv + 1);
96 sr = srunner_create(s);
97
98 srunner_run_all(sr, CK_ENV);
99 failed_count = srunner_ntests_failed(sr);
100 srunner_free(sr);
101
102 return (failed_count == 0) ? 0 : 255;
103}
diff --git a/libraries/ecore/src/tests/ecore_suite.h b/libraries/ecore/src/tests/ecore_suite.h
new file mode 100644
index 0000000..0c7dfef
--- /dev/null
+++ b/libraries/ecore/src/tests/ecore_suite.h
@@ -0,0 +1,11 @@
1#ifndef _ECORE_SUITE_H
2#define _ECORE_SUITE_H
3
4#include <check.h>
5
6void ecore_test_ecore(TCase *tc);
7void ecore_test_ecore_con(TCase *tc);
8void ecore_test_ecore_x(TCase *tc);
9
10
11#endif /* _ECORE_SUITE_H */
diff --git a/libraries/ecore/src/tests/ecore_test_ecore.c b/libraries/ecore/src/tests/ecore_test_ecore.c
new file mode 100644
index 0000000..3649196
--- /dev/null
+++ b/libraries/ecore/src/tests/ecore_test_ecore.c
@@ -0,0 +1,367 @@
1#ifdef HAVE_CONFIG_H
2# include <config.h>
3#endif
4
5#include <stdio.h>
6#include <unistd.h>
7
8#include <Eina.h>
9#include <Ecore.h>
10
11#include "ecore_suite.h"
12
13static int _log_dom;
14#define INF(...) EINA_LOG_DOM_INFO(_log_dom, __VA_ARGS__)
15
16static Eina_Bool
17_quit_cb(void *data)
18{
19 Eina_Bool *val = data;
20 *val = EINA_TRUE;
21 ecore_main_loop_quit();
22 return EINA_FALSE;
23}
24
25static Eina_Bool
26_dummy_cb(void *data)
27{
28 return !!data;
29}
30
31START_TEST(ecore_test_ecore_init)
32{
33 int ret;
34
35 ret = ecore_init();
36 fail_if(ret != 1);
37
38 ret = ecore_shutdown();
39 fail_if(ret != 0);
40}
41END_TEST
42
43START_TEST(ecore_test_ecore_main_loop)
44{
45 Eina_Bool did = EINA_FALSE;
46 Ecore_Timer *timer;
47 int ret;
48
49 ret = ecore_init();
50 fail_if(ret != 1);
51
52 timer = ecore_timer_add(0.0, _quit_cb, &did);
53 fail_if(timer == NULL);
54
55 ecore_main_loop_begin();
56
57 fail_if(did == EINA_FALSE);
58
59 ret = ecore_shutdown();
60 fail_if(ret != 0);
61}
62END_TEST
63
64START_TEST(ecore_test_ecore_main_loop_idler)
65{
66 Eina_Bool did = EINA_FALSE;
67 Ecore_Idler *idler;
68 int ret;
69
70 ret = ecore_init();
71 fail_if(ret != 1);
72
73 idler = ecore_idler_add(_quit_cb, &did);
74 fail_if(idler == NULL);
75
76 ecore_main_loop_begin();
77
78 fail_if(did == EINA_FALSE);
79
80 ret = ecore_shutdown();
81 fail_if(ret != 0);
82}
83END_TEST
84
85START_TEST(ecore_test_ecore_main_loop_idle_enterer)
86{
87 Eina_Bool did = EINA_FALSE;
88 Ecore_Idle_Enterer *idle_enterer;
89 int ret;
90
91 ret = ecore_init();
92 fail_if(ret != 1);
93
94 idle_enterer = ecore_idle_enterer_add(_quit_cb, &did);
95 fail_if(idle_enterer == NULL);
96
97 ecore_main_loop_begin();
98
99 fail_if(did == EINA_FALSE);
100
101 ret = ecore_shutdown();
102 fail_if(ret != 0);
103}
104END_TEST
105
106START_TEST(ecore_test_ecore_main_loop_idle_exiter)
107{
108 Eina_Bool did = EINA_FALSE;
109 Ecore_Timer *timer;
110 Ecore_Idle_Exiter *idle_exiter;
111 int ret;
112
113 ret = ecore_init();
114 fail_if(ret != 1);
115
116 /* make system exit idle */
117 timer = ecore_timer_add(0.0, _dummy_cb, (void *)(long)0);
118 fail_if(timer == NULL);
119
120 idle_exiter = ecore_idle_exiter_add(_quit_cb, &did);
121 fail_if(idle_exiter == NULL);
122
123 ecore_main_loop_begin();
124
125 fail_if(did == EINA_FALSE);
126
127 ret = ecore_shutdown();
128 fail_if(ret != 0);
129}
130END_TEST
131
132START_TEST(ecore_test_ecore_main_loop_timer)
133{
134 Eina_Bool did = EINA_FALSE;
135 Ecore_Timer *timer;
136 double start, end, elapsed;
137 int ret;
138
139 ret = ecore_init();
140 fail_if(ret != 1);
141
142 timer = ecore_timer_add(2.0, _quit_cb, &did);
143 fail_if(timer == NULL);
144
145 start = ecore_time_get();
146 ecore_main_loop_begin();
147 end = ecore_time_get();
148 elapsed = end - start;
149
150 fail_if(did == EINA_FALSE);
151 fail_if(elapsed < 2.0);
152 fail_if(elapsed > 3.0); /* 1 second "error margin" */
153
154 ret = ecore_shutdown();
155 fail_if(ret != 0);
156}
157END_TEST
158
159static Eina_Bool _timer3(void *data)
160{
161 /* timer 3, do nothing */
162 return EINA_FALSE;
163}
164
165static Eina_Bool _timer2(void *data)
166{
167 /* timer 2, quit inner mainloop */
168 ecore_main_loop_quit();
169 return EINA_FALSE;
170}
171
172static Eina_Bool _timer1(void *data)
173{
174 /* timer 1, begin inner mainloop */
175 int *times = data;
176 (*times)++;
177
178 ecore_timer_add(0.3, _timer2, NULL);
179 ecore_timer_add(0.1, _timer3, NULL);
180 ecore_main_loop_begin();
181
182 ecore_main_loop_quit();
183
184 return EINA_FALSE;
185}
186
187START_TEST(ecore_test_ecore_main_loop_timer_inner)
188{
189 Ecore_Timer *timer;
190 int ret;
191 int times = 0;
192
193 ret = ecore_init();
194 fail_if(ret != 1);
195
196 timer = ecore_timer_add(1.0, _timer1, &times);
197 fail_if(timer == NULL);
198
199 /* BEGIN: outer mainloop */
200 ecore_main_loop_begin();
201 /*END: outer mainloop */
202
203 fail_if(times != 1);
204}
205END_TEST
206
207static Eina_Bool
208_fd_handler_cb(void *data, Ecore_Fd_Handler *handler __UNUSED__)
209{
210 /* FIXME: why setting val if it is overwritten just after and what is its purpose ??? */
211 Eina_Bool *val = data;
212
213 *val = EINA_TRUE;
214 ecore_main_loop_quit();
215 return EINA_FALSE;
216}
217
218START_TEST(ecore_test_ecore_main_loop_fd_handler)
219{
220 Eina_Bool did = EINA_FALSE;
221 Ecore_Fd_Handler *fd_handler;
222 int comm[2];
223 int ret;
224
225 ret = ecore_init();
226 fail_if(ret != 1);
227
228 ret = pipe(comm);
229 fail_if(ret != 0);
230
231 fd_handler = ecore_main_fd_handler_add
232 (comm[0], ECORE_FD_READ, _fd_handler_cb, &did, NULL, NULL);
233 fail_if(fd_handler == NULL);
234
235 ret = write(comm[1], &did, 1);
236 fail_if(ret != 1);
237
238 ecore_main_loop_begin();
239
240 close(comm[0]);
241 close(comm[1]);
242
243 fail_if(did == EINA_FALSE);
244
245 ret = ecore_shutdown();
246 fail_if(ret != 0);
247}
248END_TEST
249
250static Eina_Bool
251_event_handler_cb(void *data, int type __UNUSED__, void *event __UNUSED__)
252{
253 /* FIXME: why setting val if it is overwritten just after and what is its purpose ??? */
254 Eina_Bool *val = data;
255
256 *val = EINA_TRUE;
257 ecore_main_loop_quit();
258 return EINA_FALSE;
259}
260
261START_TEST(ecore_test_ecore_main_loop_event)
262{
263 Eina_Bool did = EINA_FALSE;
264 Ecore_Event_Handler *handler;
265 Ecore_Event *event;
266 int ret, type;
267
268 ret = ecore_init();
269 fail_if(ret != 1);
270
271 type = ecore_event_type_new();
272 fail_if(type < 1);
273
274 handler = ecore_event_handler_add(type, _event_handler_cb, &did);
275 fail_if(handler == NULL);
276
277 event = ecore_event_add(type, NULL, NULL, NULL);
278 fail_if(event == NULL);
279
280 ecore_main_loop_begin();
281
282 fail_if(did == EINA_FALSE);
283
284 ret = ecore_shutdown();
285 fail_if(ret != 0);
286}
287END_TEST
288
289static Eina_Bool
290_timer_quit_recursive(void *data)
291{
292 INF(" _timer_quit_recursive: begin");
293 ecore_main_loop_quit(); /* quits inner main loop */
294 INF(" _timer_quit_recursive: end");
295 return EINA_FALSE;
296}
297
298static Eina_Bool
299_event_recursive_cb(void *data, int type, void *event)
300{
301 Ecore_Event *e;
302 static int guard = 0;
303
304 /* If we enter this callback more than once, it's wrong! */
305 fail_if(guard != 0);
306 guard++;
307
308 INF(" event_recursive_cb: begin");
309
310 ecore_timer_add(1.0, _timer_quit_recursive, NULL);
311 INF(" add 1.0s timer (once) to trigger _timer_quit_recursive");
312
313 INF(" inner main loop begin (recurse)");
314 ecore_main_loop_begin();
315 INF(" inner main loop end (recurse)");
316
317 ecore_main_loop_quit(); /* quits outer main loop */
318
319 INF(" guard = %d", guard);
320 INF(" event_recursive_cb: end");
321 return EINA_FALSE;
322}
323
324
325START_TEST(ecore_test_ecore_main_loop_event_recursive)
326{
327 /* This test tests if the event handlers are really called only once when
328 * recursive main loops are used and any number of events may have occurred
329 * between the beginning and the end of recursive main loop.
330 */
331 Ecore_Event *e;
332 int type;
333 int ret;
334
335 _log_dom = eina_log_domain_register("test", EINA_COLOR_CYAN);
336
337 INF("main: begin");
338 ret = ecore_init();
339 fail_if(ret != 1);
340
341
342 type = ecore_event_type_new();
343 ecore_event_handler_add(type, _event_recursive_cb, NULL);
344 e = ecore_event_add(type, NULL, NULL, NULL);
345 INF(" add event to trigger cb1: event=%p", e);
346 INF(" main loop begin");
347 ecore_main_loop_begin();
348 INF(" main loop end");
349
350 INF("main: end");
351 ecore_shutdown();
352}
353END_TEST
354
355void ecore_test_ecore(TCase *tc)
356{
357 tcase_add_test(tc, ecore_test_ecore_init);
358 tcase_add_test(tc, ecore_test_ecore_main_loop);
359 tcase_add_test(tc, ecore_test_ecore_main_loop_idler);
360 tcase_add_test(tc, ecore_test_ecore_main_loop_idle_enterer);
361 tcase_add_test(tc, ecore_test_ecore_main_loop_idle_exiter);
362 tcase_add_test(tc, ecore_test_ecore_main_loop_timer);
363 tcase_add_test(tc, ecore_test_ecore_main_loop_fd_handler);
364 tcase_add_test(tc, ecore_test_ecore_main_loop_event);
365 tcase_add_test(tc, ecore_test_ecore_main_loop_timer_inner);
366 tcase_add_test(tc, ecore_test_ecore_main_loop_event_recursive);
367}
diff --git a/libraries/ecore/src/tests/ecore_test_ecore_con.c b/libraries/ecore/src/tests/ecore_test_ecore_con.c
new file mode 100644
index 0000000..45c1f69
--- /dev/null
+++ b/libraries/ecore/src/tests/ecore_test_ecore_con.c
@@ -0,0 +1,258 @@
1#ifdef HAVE_CONFIG_H
2# include <config.h>
3#endif
4
5#include <Ecore_Con.h>
6
7#include "ecore_suite.h"
8
9#include <stdio.h>
10#include <Ecore.h>
11#include <Ecore_Con.h>
12
13Eina_Bool
14_add(void *data, int type __UNUSED__, void *ev)
15{
16 fail_if (type != ECORE_CON_EVENT_CLIENT_ADD &&
17 type != ECORE_CON_EVENT_SERVER_ADD);
18
19 /* Server */
20 if (type == ECORE_CON_EVENT_CLIENT_ADD)
21 {
22 Ecore_Con_Event_Client_Add *event = ev;
23
24 fail_if (data != (void *) 1);
25 fail_if (!event->client);
26
27 printf("Client with ip %s, port %d, connected = %d!\n",
28 ecore_con_client_ip_get(event->client),
29 ecore_con_client_port_get(event->client),
30 ecore_con_client_connected_get(event->client));
31
32 ecore_con_client_timeout_set(event->client, 10);
33
34 }
35 else if (type == ECORE_CON_EVENT_SERVER_ADD)
36 {
37 Ecore_Con_Event_Server_Add *event = ev;
38 const char ping[] = "PING";
39 int ret;
40
41 fail_if (data != (void *) 2);
42 fail_if (!event->server);
43 printf("Server with ip %s, name %s, port %d, connected = %d!\n",
44 ecore_con_server_ip_get(event->server),
45 ecore_con_server_name_get(event->server),
46 ecore_con_server_port_get(event->server),
47 ecore_con_server_connected_get(event->server));
48 ret = ecore_con_server_send(event->server, ping, sizeof(ping));
49 fail_if (ret != sizeof(ping));
50 ecore_con_server_flush(event->server);
51 }
52
53 return ECORE_CALLBACK_RENEW;
54}
55
56Eina_Bool
57_del(void *data , int type __UNUSED__, void *ev)
58{
59 fail_if (type != ECORE_CON_EVENT_CLIENT_DEL &&
60 type != ECORE_CON_EVENT_SERVER_DEL);
61
62 /* Server */
63 if (type == ECORE_CON_EVENT_CLIENT_DEL)
64 {
65 Ecore_Con_Event_Client_Del *event = ev;
66
67 fail_if (data != (void *) 1);
68 fail_if (!event->client);
69
70 printf("Lost client with ip %s!\n", ecore_con_client_ip_get(event->client));
71 printf("Client was connected for %0.3f seconds.\n",
72 ecore_con_client_uptime_get(event->client));
73
74 ecore_con_client_del(event->client);
75 }
76 else if (type == ECORE_CON_EVENT_SERVER_DEL)
77 {
78 Ecore_Con_Event_Server_Del *event = ev;
79
80 fail_if (!event->server);
81
82 fail_if (data != (void *) 2);
83
84 printf("Lost server with ip %s!\n", ecore_con_server_ip_get(event->server));
85
86 ecore_con_server_del(event->server);
87 }
88 fail ();
89
90 return ECORE_CALLBACK_RENEW;
91}
92
93Eina_Bool
94_data(void *data, int type __UNUSED__, void *ev)
95{
96
97 fail_if (type != ECORE_CON_EVENT_CLIENT_DATA &&
98 type != ECORE_CON_EVENT_SERVER_DATA);
99
100 /* Server */
101 if (type == ECORE_CON_EVENT_CLIENT_DATA)
102 {
103 Ecore_Con_Event_Client_Data *event = ev;
104 const char pong[] = "PONG";
105 int ret;
106
107 char fmt[128];
108 fail_if (data != (void *) 1);
109
110 snprintf(fmt, sizeof(fmt),
111 "Received %i bytes from client %s port %d:\n"
112 ">>>>>\n"
113 "%%.%is\n"
114 ">>>>>\n",
115 event->size, ecore_con_client_ip_get(event->client),
116 ecore_con_client_port_get(event->client), event->size);
117
118 printf(fmt, event->data);
119 fail_if (event->size != sizeof("PING"));
120 fail_if (memcmp (event->data, "PING", sizeof("PING")) != 0);
121
122 ret = ecore_con_client_send(event->client, pong, sizeof(pong));
123 fail_if (ret != sizeof(pong));
124 ecore_con_client_flush(event->client);
125 }
126 else if (type == ECORE_CON_EVENT_SERVER_DATA)
127 {
128 Ecore_Con_Event_Server_Data *event = ev;
129 char fmt[128];
130
131 fail_if (data != (void *) 2);
132
133 snprintf(fmt, sizeof(fmt),
134 "Received %i bytes from server:\n"
135 ">>>>>\n"
136 "%%.%is\n"
137 ">>>>>\n",
138 event->size, event->size);
139
140 printf(fmt, event->data);
141 fail_if (event->size != sizeof("PONG"));
142 fail_if (memcmp (event->data, "PONG", sizeof("PONG")) != 0);
143 ecore_main_loop_quit();
144 }
145
146 return ECORE_CALLBACK_RENEW;
147}
148
149START_TEST(ecore_test_ecore_con_server)
150{
151 Ecore_Con_Server *server;
152 Ecore_Con_Server *client;
153 Ecore_Con_Client *cl;
154 const Eina_List *clients, *l;
155 Ecore_Event_Handler *handlers[6];
156 void *server_data = malloc (1);
157 void *client_data = malloc (1);
158 int ret;
159 void *del_ret;
160
161 ret = eina_init();
162 fail_if(ret != 1);
163 ret = ecore_init();
164 fail_if(ret != 1);
165 ret = ecore_con_init();
166 fail_if(ret != 1);
167
168 handlers[0] = ecore_event_handler_add(ECORE_CON_EVENT_CLIENT_ADD,
169 _add, (void *) 1);
170 fail_if(handlers[0] == NULL);
171 handlers[1] = ecore_event_handler_add(ECORE_CON_EVENT_CLIENT_DEL,
172 _del, (void *) 1);
173 fail_if(handlers[1] == NULL);
174 handlers[2] = ecore_event_handler_add(ECORE_CON_EVENT_CLIENT_DATA,
175 _data, (void *) 1);
176 fail_if(handlers[2] == NULL);
177
178 handlers[3] = ecore_event_handler_add(ECORE_CON_EVENT_SERVER_ADD,
179 _add, (void *) 2);
180 fail_if(handlers[3] == NULL);
181 handlers[4] = ecore_event_handler_add(ECORE_CON_EVENT_SERVER_DEL,
182 _del, (void *) 2);
183 fail_if(handlers[4] == NULL);
184 handlers[5] = ecore_event_handler_add(ECORE_CON_EVENT_SERVER_DATA,
185 _data, (void *) 2);
186 fail_if(handlers[5] == NULL);
187
188 server = ecore_con_server_add(ECORE_CON_REMOTE_TCP, "::1", 8080,
189 server_data);
190 fail_if (server == NULL);
191
192 ecore_con_server_timeout_set(server, 10);
193 ecore_con_server_client_limit_set(server, 1, 0);
194
195 client = ecore_con_server_connect(ECORE_CON_REMOTE_TCP, "::1", 8080,
196 client_data);
197 fail_if (client == NULL);
198
199 ecore_main_loop_begin();
200
201 clients = ecore_con_server_clients_get(server);
202 printf("Clients connected to this server when exiting: %d\n",
203 eina_list_count(clients));
204 EINA_LIST_FOREACH(clients, l, cl)
205 {
206 printf("%s\n", ecore_con_client_ip_get(cl));
207 }
208
209 printf("Server was up for %0.3f seconds\n",
210 ecore_con_server_uptime_get(server));
211
212 del_ret = ecore_con_server_del(server);
213 fail_if (del_ret != server_data);
214 free (server_data);
215 del_ret = ecore_con_server_del(client);
216 fail_if (del_ret != client_data);
217 free (client_data);
218
219 del_ret = ecore_event_handler_del (handlers[0]);
220 fail_if (del_ret != (void *) 1);
221 del_ret = ecore_event_handler_del (handlers[1]);
222 fail_if (del_ret != (void *) 1);
223 del_ret = ecore_event_handler_del (handlers[2]);
224 fail_if (del_ret != (void *) 1);
225
226 del_ret = ecore_event_handler_del (handlers[3]);
227 fail_if (del_ret != (void *) 2);
228 del_ret = ecore_event_handler_del (handlers[4]);
229 fail_if (del_ret != (void *) 2);
230 del_ret = ecore_event_handler_del (handlers[5]);
231 fail_if (del_ret != (void *) 2);
232
233 ret = ecore_con_shutdown();
234 fail_if(ret != 0);
235 ret = ecore_shutdown();
236 fail_if(ret != 0);
237 ret = eina_shutdown();
238 fail_if(ret != 0);
239}
240END_TEST
241
242START_TEST(ecore_test_ecore_con_init)
243{
244 int ret;
245
246 ret = ecore_con_init();
247 fail_if(ret != 1);
248
249 ret = ecore_con_shutdown();
250 fail_if(ret != 0);
251}
252END_TEST
253
254void ecore_test_ecore_con(TCase *tc)
255{
256 tcase_add_test(tc, ecore_test_ecore_con_init);
257 tcase_add_test(tc, ecore_test_ecore_con_server);
258}
diff --git a/libraries/ecore/src/tests/ecore_test_ecore_x.c b/libraries/ecore/src/tests/ecore_test_ecore_x.c
new file mode 100644
index 0000000..4b9e126
--- /dev/null
+++ b/libraries/ecore/src/tests/ecore_test_ecore_x.c
@@ -0,0 +1,56 @@
1#ifdef HAVE_CONFIG_H
2# include <config.h>
3#endif
4
5#include <Ecore_X.h>
6
7#include "ecore_suite.h"
8
9
10/* TODO: change to HAVE_ECORE_X when xcb implementation is done */
11#ifdef HAVE_ECORE_X_XLIB
12
13START_TEST(ecore_test_ecore_x_init)
14{
15 int ret;
16
17 ret = ecore_x_init(NULL);
18 fail_if(ret != 1);
19
20 ret = ecore_x_shutdown();
21 fail_if(ret != 0);
22}
23END_TEST
24
25START_TEST(ecore_test_ecore_x_bell)
26{
27 int i;
28 int ret;
29
30 ret = ecore_x_init(NULL);
31 fail_if(ret != 1);
32
33 printf("You should hear 3 beeps now.\n");
34 for (i = 0; i < 3; i++)
35 {
36 ret = ecore_x_bell(0);
37 fail_if(ret != EINA_TRUE);
38 ecore_x_sync();
39 sleep(1);
40 }
41
42 ecore_x_shutdown();
43}
44END_TEST
45
46#endif
47
48void ecore_test_ecore_x(TCase *tc)
49{
50
51/* TODO: change to HAVE_ECORE_X when xcb implementation is done */
52#ifdef HAVE_ECORE_X_XLIB
53 tcase_add_test(tc, ecore_test_ecore_x_init);
54 tcase_add_test(tc, ecore_test_ecore_x_bell);
55#endif
56}