2012-04-05 08:31:15 -07:00
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
# include <config.h>
|
|
|
|
#endif
|
|
|
|
|
2012-05-01 00:40:14 -07:00
|
|
|
#include "eo_suite.h"
|
2016-02-04 06:02:57 -08:00
|
|
|
#include "../../efl_check.h"
|
2018-03-27 10:51:13 -07:00
|
|
|
#include <Eo.h>
|
2018-11-08 06:27:10 -08:00
|
|
|
#include <eo_ptr_indirection.h>
|
2018-10-11 22:59:13 -07:00
|
|
|
#include <Eina.h>
|
|
|
|
|
|
|
|
int _eo_log_dom = -1;
|
2012-04-05 08:31:15 -07:00
|
|
|
|
2016-02-04 06:02:57 -08:00
|
|
|
static const Efl_Test_Case etc[] = {
|
2012-05-01 00:40:14 -07:00
|
|
|
{ "Eo init", eo_test_init },
|
|
|
|
{ "Eo general", eo_test_general },
|
|
|
|
{ "Eo class errors", eo_test_class_errors },
|
2014-11-18 07:24:39 -08:00
|
|
|
{ "Eo class behaviour errors", eo_test_class_behaviour_errors },
|
2014-01-08 05:48:36 -08:00
|
|
|
{ "Eo call errors", eo_test_call_errors },
|
2013-04-24 08:45:34 -07:00
|
|
|
{ "Eo eina value", eo_test_value },
|
eo2: add tests for thread safe call stack
Summary:
2 threads run 'eo2_do(o, a(), b());'
- A goes first, creates an object, enters 'eo2_do(o, a(), b());'
in a() call, it blocks, releases B and waits for it.
- B when released, creates an object, enters 'eo2_do(o, a(), b());'
in a() call, it joins and releases A, then blocks.
- A returns from a(); and enters b() using current call stack frame,
which is the one pushed by B! then pop the frame and releases B.
- B does as above using the stack pushed by A!
2014-01-21 08:42:07 -08:00
|
|
|
{ "Eo threaded eo calls", eo_test_threaded_calls },
|
2016-11-29 11:18:44 -08:00
|
|
|
{ "Eo event calls", eo_test_event},
|
2018-06-06 04:50:11 -07:00
|
|
|
{ "Eo lifecycle", eo_test_lifecycle},
|
2019-02-05 06:40:41 -08:00
|
|
|
{ "Eo Reflection", eo_test_reflection},
|
2012-04-05 08:31:15 -07:00
|
|
|
{ NULL, NULL }
|
|
|
|
};
|
|
|
|
|
2018-03-27 10:51:13 -07:00
|
|
|
SUITE_INIT(efl_object)
|
|
|
|
{
|
|
|
|
ck_assert_int_eq(efl_object_init(), 1);
|
2018-10-11 22:59:13 -07:00
|
|
|
_eo_log_dom = eina_log_domain_register("eo-log", EINA_COLOR_LIGHTBLUE);
|
2018-03-27 10:51:13 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
SUITE_SHUTDOWN(efl_object)
|
|
|
|
{
|
2018-10-11 22:59:13 -07:00
|
|
|
eina_log_domain_unregister(_eo_log_dom);
|
2018-03-27 10:51:13 -07:00
|
|
|
ck_assert_int_eq(efl_object_shutdown(), 0);
|
|
|
|
}
|
|
|
|
|
2012-04-05 08:31:15 -07:00
|
|
|
int
|
|
|
|
main(int argc, char **argv)
|
|
|
|
{
|
2016-02-04 06:02:57 -08:00
|
|
|
int failed_count;
|
2012-04-05 08:31:15 -07:00
|
|
|
|
2016-02-04 06:02:57 -08:00
|
|
|
if (!_efl_test_option_disp(argc, argv, etc))
|
|
|
|
return 0;
|
2012-04-05 08:31:15 -07:00
|
|
|
|
2017-02-03 05:49:38 -08:00
|
|
|
#ifdef NEED_RUN_IN_TREE
|
2013-01-04 09:19:43 -08:00
|
|
|
putenv("EFL_RUN_IN_TREE=1");
|
2017-02-03 05:49:38 -08:00
|
|
|
#endif
|
2013-01-04 09:19:43 -08:00
|
|
|
|
2016-02-04 06:02:57 -08:00
|
|
|
failed_count = _efl_suite_build_and_run(argc - 1, (const char **)argv + 1,
|
2018-03-27 10:51:13 -07:00
|
|
|
"Eo", etc, SUITE_INIT_FN(efl_object), SUITE_SHUTDOWN_FN(efl_object));
|
2012-04-05 08:31:15 -07:00
|
|
|
|
|
|
|
return (failed_count == 0) ? 0 : 255;
|
|
|
|
}
|