efl/src/tests/elua/elua_suite.c

47 lines
851 B
C
Raw Normal View History

2015-04-16 02:55:27 -07:00
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#ifdef _WIN32
# include <evil_private.h> /* setenv unsetenv */
#endif
2015-04-16 02:55:27 -07:00
#include "elua_suite.h"
2016-02-04 05:57:14 -08:00
#include "../efl_check.h"
#include <Elua.h>
2015-04-16 02:55:27 -07:00
2016-02-04 05:57:14 -08:00
static const Efl_Test_Case etc[] = {
2015-04-16 02:55:27 -07:00
{ "Elua Library", elua_lib_test},
{ NULL, NULL }
};
SUITE_INIT(elua)
{
ck_assert_int_eq(elua_init(), 1);
}
SUITE_SHUTDOWN(elua)
{
ck_assert_int_eq(elua_shutdown(), 0);
}
2015-04-16 02:55:27 -07:00
int
main(int argc, char **argv)
{
2016-02-04 05:57:14 -08:00
int failed_count;
2015-04-16 02:55:27 -07:00
setenv("CK_FORK", "no", 0);
2016-02-04 05:57:14 -08:00
if (!_efl_test_option_disp(argc, argv, etc))
return 0;
2015-04-16 02:55:27 -07:00
#ifdef NEED_RUN_IN_TREE
2015-04-16 02:55:27 -07:00
putenv("EFL_RUN_IN_TREE=1");
#endif
2015-04-16 02:55:27 -07:00
2016-02-04 05:57:14 -08:00
failed_count = _efl_suite_build_and_run(argc - 1, (const char **)argv + 1,
"Elua", etc, SUITE_INIT_FN(elua), SUITE_SHUTDOWN_FN(elua));
2015-04-16 02:55:27 -07:00
return (failed_count == 0) ? 0 : 255;
}