summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Michael <cp.michael@samsung.com>2019-07-15 08:35:49 -0400
committerChristopher Michael <cp.michael@samsung.com>2019-07-15 09:53:59 -0400
commite33609937e90c4129a495fadf8f68baee0d645f4 (patch)
tree0ec40838530471a9bf2c23145d3dfbc3c86f96f4
parent43993fd7fceb982da2d0f6c294c28a9af48d7ae5 (diff)
tests: Add start of Ecore_Wl2 test suite
Small patch set to add the start of a Ecore_Wl2 test suite ref T8016
-rw-r--r--src/tests/ecore_wl2/ecore_wl2_suite.c45
-rw-r--r--src/tests/ecore_wl2/ecore_wl2_suite.h9
-rw-r--r--src/tests/ecore_wl2/ecore_wl2_test_ecore_wl2.c23
-rw-r--r--src/tests/ecore_wl2/meson.build17
4 files changed, 94 insertions, 0 deletions
diff --git a/src/tests/ecore_wl2/ecore_wl2_suite.c b/src/tests/ecore_wl2/ecore_wl2_suite.c
new file mode 100644
index 0000000000..234a581ef0
--- /dev/null
+++ b/src/tests/ecore_wl2/ecore_wl2_suite.c
@@ -0,0 +1,45 @@
1#ifdef HAVE_CONFIG_H
2# include <config.h>
3#endif
4
5#include "ecore_wl2_suite.h"
6#include "../efl_check.h"
7#include <Ecore_Wl2.h>
8
9static const Efl_Test_Case etc[] =
10{
11#if HAVE_ECORE_WL2
12 { "Ecore_Wl2", ecore_wl2_test_init },
13#endif
14 { NULL, NULL }
15};
16
17SUITE_INIT(ecore_wl2)
18{
19 ck_assert_int_eq(ecore_wl2_init(), 1);
20}
21
22SUITE_SHUTDOWN(ecore_wl2)
23{
24 ck_assert_int_eq(ecore_wl2_shutdown(), 0);
25}
26
27int
28main(int argc, char **argv)
29{
30 int count;
31
32 if (!_efl_test_option_disp(argc, argv, etc)) return 0;
33
34#ifdef NEED_RUN_IN_TREE
35 putenv("EFL_RUN_IN_TREE=1");
36#endif
37
38 count =
39 _efl_suite_build_and_run(argc - 1,
40 (const char **)argv + 1, "Ecore_Wl2", etc,
41 SUITE_INIT_FN(ecore_wl2),
42 SUITE_SHUTDOWN_FN(ecore_wl2));
43
44 return (count == 0) ? 0 : 255;
45}
diff --git a/src/tests/ecore_wl2/ecore_wl2_suite.h b/src/tests/ecore_wl2/ecore_wl2_suite.h
new file mode 100644
index 0000000000..b17d8a767f
--- /dev/null
+++ b/src/tests/ecore_wl2/ecore_wl2_suite.h
@@ -0,0 +1,9 @@
1#ifndef _ECORE_WL2_SUITE_H
2# define _ECORE_WL2_SUITE_H
3
4# include <check.h>
5# include "../efl_check.h"
6
7void ecore_wl2_test_init(TCase *tc);
8
9#endif
diff --git a/src/tests/ecore_wl2/ecore_wl2_test_ecore_wl2.c b/src/tests/ecore_wl2/ecore_wl2_test_ecore_wl2.c
new file mode 100644
index 0000000000..6ed6b7343f
--- /dev/null
+++ b/src/tests/ecore_wl2/ecore_wl2_test_ecore_wl2.c
@@ -0,0 +1,23 @@
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#include <Ecore_Wl2.h>
11
12#include "ecore_wl2_suite.h"
13
14EFL_START_TEST(ecore_wl2_simple)
15{
16}
17EFL_END_TEST
18
19void
20ecore_wl2_test_init(TCase *tc)
21{
22 tcase_add_test(tc, ecore_wl2_simple);
23}
diff --git a/src/tests/ecore_wl2/meson.build b/src/tests/ecore_wl2/meson.build
new file mode 100644
index 0000000000..11500c781e
--- /dev/null
+++ b/src/tests/ecore_wl2/meson.build
@@ -0,0 +1,17 @@
1ecore_wl2_suite_src = [
2 'ecore_wl2_suite.c',
3 'ecore_wl2_suite.h',
4 'ecore_wl2_test_ecore_wl2.c'
5]
6
7ecore_wl2_suite = executable('ecore_wl2_suite',
8 ecore_wl2_suite_src,
9 dependencies: [ecore_wl2, ecore, check],
10 c_args : [
11 '-DTESTS_BUILD_DIR="'+meson.current_build_dir()+'"',
12 '-DTESTS_SRC_DIR="'+meson.current_source_dir()+'"']
13)
14
15test('ecore_wl2-suite', ecore_wl2_suite,
16 env : test_env
17)