2018-03-02 01:16:05 -08:00
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
# include <config.h>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <unistd.h>
|
|
|
|
#define EFL_NOLEGACY_API_SUPPORT
|
|
|
|
#include <Efl_Core.h>
|
|
|
|
#include "efl_app_suite.h"
|
|
|
|
#include "../efl_check.h"
|
|
|
|
|
2018-03-26 11:19:28 -07:00
|
|
|
EFL_START_TEST(efl_app_test_efl_build_version)
|
2018-03-02 01:16:05 -08:00
|
|
|
{
|
|
|
|
const Efl_Version *ver;
|
|
|
|
Eo *app;
|
|
|
|
|
|
|
|
ecore_init();
|
|
|
|
|
2018-12-19 11:02:08 -08:00
|
|
|
app = efl_app_main_get(EFL_APP_CLASS);
|
2018-03-02 01:16:05 -08:00
|
|
|
fail_if(!efl_isa(app, EFL_APP_CLASS));
|
|
|
|
|
|
|
|
efl_build_version_set(EFL_VERSION_MAJOR, EFL_VERSION_MINOR, 0, 0, NULL, EFL_BUILD_ID);
|
|
|
|
ver = efl_app_build_efl_version_get(app);
|
|
|
|
fail_if(!ver);
|
|
|
|
fail_if(ver->major != EFL_VERSION_MAJOR);
|
|
|
|
fail_if(ver->minor != EFL_VERSION_MINOR);
|
|
|
|
fail_if(ver->micro != 0);
|
|
|
|
fail_if(ver->revision != 0);
|
|
|
|
fail_if(ver->flavor);
|
|
|
|
fail_if(!eina_streq(ver->build_id, EFL_BUILD_ID));
|
|
|
|
|
|
|
|
ver = efl_app_efl_version_get(app);
|
|
|
|
fail_if(!ver);
|
|
|
|
fail_if(ver->major != EFL_VERSION_MAJOR);
|
|
|
|
fail_if(ver->minor != EFL_VERSION_MINOR);
|
|
|
|
|
|
|
|
ecore_shutdown();
|
|
|
|
}
|
2018-03-26 11:19:28 -07:00
|
|
|
EFL_END_TEST
|
2018-03-02 01:16:05 -08:00
|
|
|
|
|
|
|
void efl_test_efl_app(TCase *tc)
|
|
|
|
{
|
|
|
|
tcase_add_test(tc, efl_app_test_efl_build_version);
|
|
|
|
}
|
|
|
|
|
|
|
|
static const Efl_Test_Case etc[] = {
|
2018-04-09 04:37:00 -07:00
|
|
|
{ "App", efl_test_efl_app },
|
|
|
|
{ "Loop", efl_app_test_efl_loop },
|
2018-04-09 04:37:00 -07:00
|
|
|
{ "Loop_Timer", efl_app_test_efl_loop_timer },
|
2018-04-09 04:37:01 -07:00
|
|
|
{ "Loop_FD", efl_app_test_efl_loop_fd },
|
2018-04-09 04:37:03 -07:00
|
|
|
{ "Promise", efl_app_test_promise },
|
2018-04-09 04:37:04 -07:00
|
|
|
{ "Promise", efl_app_test_promise_2 },
|
|
|
|
{ "Promise", efl_app_test_promise_3 },
|
|
|
|
{ "Promise", efl_app_test_promise_safety },
|
2019-02-12 12:34:27 -08:00
|
|
|
{ "Env", efl_test_efl_env },
|
Revert "Revert command line array object because it's broken by design"
This reverts commit a57c7f751023fe1d1edeabbf8683574ac7497e5e.
I pretty much hate to just revert your revert, but you failed to read my
replies, and failed to understand what i was talking about.
And YES we talked at fosdem about the platform issue, and do you
remember my answer, that back in time this might be the case, today is
different freebsd suppoerts setenv, and for windows we have a setenv
implementation in evil. And yes, vtorri also created a issue how bad and
evil this commit is, however, i still fail to see the issue since setenv
unsetenv and clearenv usages are taken as needed. (T7693)
The ownership question is answered in
https://phab.enlightenment.org/D7516#137367.
Can we please get into a state of technical discussions, and not *oh
shit, i am going to revert this* this has been in review for a long
time, a lots of people have tested it, we discussed things on it, and
there was 3 weeks of no reply from you.
The issues that exist will be dealed with. Feel free to create tasks if
you want :)
2019-02-12 12:34:30 -08:00
|
|
|
{ "CML", efl_test_efl_cml },
|
2018-03-02 01:16:05 -08:00
|
|
|
{ NULL, NULL }
|
|
|
|
};
|
|
|
|
|
2018-04-09 04:37:01 -07:00
|
|
|
SUITE_INIT(efl_app)
|
|
|
|
{
|
|
|
|
ck_assert_int_eq(ecore_init(), 1);
|
|
|
|
}
|
|
|
|
|
|
|
|
SUITE_SHUTDOWN(efl_app)
|
|
|
|
{
|
|
|
|
ck_assert_int_eq(ecore_shutdown(), 0);
|
|
|
|
}
|
|
|
|
|
2018-03-02 01:16:05 -08:00
|
|
|
int
|
|
|
|
main(int argc, char **argv)
|
|
|
|
{
|
|
|
|
int failed_count;
|
|
|
|
|
|
|
|
if (!_efl_test_option_disp(argc, argv, etc))
|
|
|
|
return 0;
|
|
|
|
|
2018-04-09 04:37:04 -07:00
|
|
|
eina_init();
|
|
|
|
efl_object_init();
|
2018-03-02 01:16:05 -08:00
|
|
|
#ifdef NEED_RUN_IN_TREE
|
|
|
|
putenv("EFL_RUN_IN_TREE=1");
|
|
|
|
#endif
|
|
|
|
|
|
|
|
failed_count = _efl_suite_build_and_run(argc - 1, (const char **)argv + 1,
|
2018-04-09 04:37:01 -07:00
|
|
|
"Efl_App", etc, SUITE_INIT_FN(efl_app), SUITE_SHUTDOWN_FN(efl_app));
|
2018-03-02 01:16:05 -08:00
|
|
|
|
2018-04-09 04:37:04 -07:00
|
|
|
efl_object_shutdown();
|
|
|
|
eina_shutdown();
|
2018-03-02 01:16:05 -08:00
|
|
|
return (failed_count == 0) ? 0 : 255;
|
|
|
|
}
|