summaryrefslogtreecommitdiff
path: root/src/tests/elput
diff options
context:
space:
mode:
authorChris Michael <cpmichael@osg.samsung.com>2016-03-24 13:38:44 -0400
committerChris Michael <cpmichael@osg.samsung.com>2016-04-13 14:16:17 -0400
commit08482e1ca4feaff2c631a125b58fda7e57084b97 (patch)
tree3d232a3467503f191285cb9bd896dd0f1d11df47 /src/tests/elput
parentf8964fcf2e4681ab77e0cf37c96e9994d25b19fd (diff)
elput: Add test framework for Elput library
Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
Diffstat (limited to 'src/tests/elput')
-rw-r--r--src/tests/elput/elput_suite.c29
-rw-r--r--src/tests/elput/elput_suite.h8
-rw-r--r--src/tests/elput/elput_test_elput.c29
3 files changed, 66 insertions, 0 deletions
diff --git a/src/tests/elput/elput_suite.c b/src/tests/elput/elput_suite.c
new file mode 100644
index 0000000000..b56b84e714
--- /dev/null
+++ b/src/tests/elput/elput_suite.c
@@ -0,0 +1,29 @@
1#ifdef HAVE_CONFIG_H
2# include <config.h>
3#endif
4
5#include "elput_suite.h"
6#include "../efl_check.h"
7
8static const Efl_Test_Case etc[] =
9{
10#if HAVE_ELPUT
11 { "Elput", elput_test_elput },
12#endif
13 { NULL, NULL }
14};
15
16int
17main(int argc, char **argv)
18{
19 int count;
20
21 if (!_efl_test_option_disp(argc, argv, etc)) return 0;
22
23 putenv("EFL_RUN_IN_TREE=1");
24
25 count =
26 _efl_suite_build_and_run(argc - 1, (const char **)argv + 1, "Elput", etc);
27
28 return (count == 0) ? 0 : 255;
29}
diff --git a/src/tests/elput/elput_suite.h b/src/tests/elput/elput_suite.h
new file mode 100644
index 0000000000..34a7ffd2e0
--- /dev/null
+++ b/src/tests/elput/elput_suite.h
@@ -0,0 +1,8 @@
1#ifndef _ELPUT_SUITE_H
2# define _ELPUT_SUITE_H
3
4# include <check.h>
5
6void elput_test_elput(TCase *tc);
7
8#endif
diff --git a/src/tests/elput/elput_test_elput.c b/src/tests/elput/elput_test_elput.c
new file mode 100644
index 0000000000..8207ee8d25
--- /dev/null
+++ b/src/tests/elput/elput_test_elput.c
@@ -0,0 +1,29 @@
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 <Elput.h>
11
12#include "elput_suite.h"
13
14START_TEST(elput_test_elput_init)
15{
16 int ret;
17
18 ret = elput_init();
19 fail_if(ret < 1);
20
21 ret = elput_shutdown();
22 fail_if(ret != 0);
23}
24END_TEST
25
26void elput_test_elput(TCase *tc)
27{
28 tcase_add_test(tc, elput_test_elput_init);
29}