tests: Add start of Ecore_Wl2 test suite
Small patch set to add the start of a Ecore_Wl2 test suite ref T8016
This commit is contained in:
parent
43993fd7fc
commit
e33609937e
|
@ -0,0 +1,45 @@
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
# include <config.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "ecore_wl2_suite.h"
|
||||||
|
#include "../efl_check.h"
|
||||||
|
#include <Ecore_Wl2.h>
|
||||||
|
|
||||||
|
static const Efl_Test_Case etc[] =
|
||||||
|
{
|
||||||
|
#if HAVE_ECORE_WL2
|
||||||
|
{ "Ecore_Wl2", ecore_wl2_test_init },
|
||||||
|
#endif
|
||||||
|
{ NULL, NULL }
|
||||||
|
};
|
||||||
|
|
||||||
|
SUITE_INIT(ecore_wl2)
|
||||||
|
{
|
||||||
|
ck_assert_int_eq(ecore_wl2_init(), 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
SUITE_SHUTDOWN(ecore_wl2)
|
||||||
|
{
|
||||||
|
ck_assert_int_eq(ecore_wl2_shutdown(), 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
main(int argc, char **argv)
|
||||||
|
{
|
||||||
|
int count;
|
||||||
|
|
||||||
|
if (!_efl_test_option_disp(argc, argv, etc)) return 0;
|
||||||
|
|
||||||
|
#ifdef NEED_RUN_IN_TREE
|
||||||
|
putenv("EFL_RUN_IN_TREE=1");
|
||||||
|
#endif
|
||||||
|
|
||||||
|
count =
|
||||||
|
_efl_suite_build_and_run(argc - 1,
|
||||||
|
(const char **)argv + 1, "Ecore_Wl2", etc,
|
||||||
|
SUITE_INIT_FN(ecore_wl2),
|
||||||
|
SUITE_SHUTDOWN_FN(ecore_wl2));
|
||||||
|
|
||||||
|
return (count == 0) ? 0 : 255;
|
||||||
|
}
|
|
@ -0,0 +1,9 @@
|
||||||
|
#ifndef _ECORE_WL2_SUITE_H
|
||||||
|
# define _ECORE_WL2_SUITE_H
|
||||||
|
|
||||||
|
# include <check.h>
|
||||||
|
# include "../efl_check.h"
|
||||||
|
|
||||||
|
void ecore_wl2_test_init(TCase *tc);
|
||||||
|
|
||||||
|
#endif
|
|
@ -0,0 +1,23 @@
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
# include <config.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
|
#include <Eina.h>
|
||||||
|
#include <Ecore.h>
|
||||||
|
#include <Ecore_Wl2.h>
|
||||||
|
|
||||||
|
#include "ecore_wl2_suite.h"
|
||||||
|
|
||||||
|
EFL_START_TEST(ecore_wl2_simple)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
EFL_END_TEST
|
||||||
|
|
||||||
|
void
|
||||||
|
ecore_wl2_test_init(TCase *tc)
|
||||||
|
{
|
||||||
|
tcase_add_test(tc, ecore_wl2_simple);
|
||||||
|
}
|
|
@ -0,0 +1,17 @@
|
||||||
|
ecore_wl2_suite_src = [
|
||||||
|
'ecore_wl2_suite.c',
|
||||||
|
'ecore_wl2_suite.h',
|
||||||
|
'ecore_wl2_test_ecore_wl2.c'
|
||||||
|
]
|
||||||
|
|
||||||
|
ecore_wl2_suite = executable('ecore_wl2_suite',
|
||||||
|
ecore_wl2_suite_src,
|
||||||
|
dependencies: [ecore_wl2, ecore, check],
|
||||||
|
c_args : [
|
||||||
|
'-DTESTS_BUILD_DIR="'+meson.current_build_dir()+'"',
|
||||||
|
'-DTESTS_SRC_DIR="'+meson.current_source_dir()+'"']
|
||||||
|
)
|
||||||
|
|
||||||
|
test('ecore_wl2-suite', ecore_wl2_suite,
|
||||||
|
env : test_env
|
||||||
|
)
|
Loading…
Reference in New Issue