summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Michael <cp.michael@samsung.com>2020-01-09 10:46:54 -0500
committerChristopher Michael <cp.michael@samsung.com>2020-01-09 10:46:54 -0500
commitd0845de6b36c3cf6f2f5dc4153fb3b3b650641da (patch)
tree5b3f08a25e9653df3b7f5633b0e7daa892e76356
parenta866de4ff0c0bb2de9a39a8657bde2f030d7dd4a (diff)
tests/ecore_wl2: Simplify test infrastructure
This commit adds the _display_connect function to the tests_helpers file so that we do not have to duplicate the function across files. ref T8016
-rw-r--r--src/tests/ecore_wl2/ecore_wl2_test_display.c6
-rw-r--r--src/tests/ecore_wl2/ecore_wl2_test_input.c10
-rw-r--r--src/tests/ecore_wl2/ecore_wl2_test_window.c10
-rw-r--r--src/tests/ecore_wl2/ecore_wl2_tests_helpers.h14
4 files changed, 9 insertions, 31 deletions
diff --git a/src/tests/ecore_wl2/ecore_wl2_test_display.c b/src/tests/ecore_wl2/ecore_wl2_test_display.c
index dd0799c3fd..fcc560311d 100644
--- a/src/tests/ecore_wl2/ecore_wl2_test_display.c
+++ b/src/tests/ecore_wl2/ecore_wl2_test_display.c
@@ -11,6 +11,12 @@
11#include "ecore_wl2_suite.h" 11#include "ecore_wl2_suite.h"
12#include "ecore_wl2_tests_helpers.h" 12#include "ecore_wl2_tests_helpers.h"
13 13
14static Ecore_Wl2_Display *
15_display_setup(void)
16{
17 return ecore_wl2_display_create(NULL);
18}
19
14EFL_START_TEST(wl2_display_create) 20EFL_START_TEST(wl2_display_create)
15{ 21{
16 Ecore_Wl2_Display *disp; 22 Ecore_Wl2_Display *disp;
diff --git a/src/tests/ecore_wl2/ecore_wl2_test_input.c b/src/tests/ecore_wl2/ecore_wl2_test_input.c
index 98b9e9758e..db6cbf3ea5 100644
--- a/src/tests/ecore_wl2/ecore_wl2_test_input.c
+++ b/src/tests/ecore_wl2/ecore_wl2_test_input.c
@@ -9,15 +9,7 @@
9#include <Ecore_Wl2.h> 9#include <Ecore_Wl2.h>
10 10
11#include "ecore_wl2_suite.h" 11#include "ecore_wl2_suite.h"
12 12#include "ecore_wl2_tests_helpers.h"
13static Ecore_Wl2_Display *
14_display_connect(void)
15{
16 Ecore_Wl2_Display *disp;
17
18 disp = ecore_wl2_display_connect(NULL);
19 return disp;
20}
21 13
22EFL_START_TEST(wl2_input_seat_get) 14EFL_START_TEST(wl2_input_seat_get)
23{ 15{
diff --git a/src/tests/ecore_wl2/ecore_wl2_test_window.c b/src/tests/ecore_wl2/ecore_wl2_test_window.c
index 611b36768c..b3ed5a7cb6 100644
--- a/src/tests/ecore_wl2/ecore_wl2_test_window.c
+++ b/src/tests/ecore_wl2/ecore_wl2_test_window.c
@@ -9,19 +9,11 @@
9#include <Ecore_Wl2.h> 9#include <Ecore_Wl2.h>
10 10
11#include "ecore_wl2_suite.h" 11#include "ecore_wl2_suite.h"
12#include "ecore_wl2_tests_helpers.h"
12 13
13#define WIDTH 480 14#define WIDTH 480
14#define HEIGHT 360 15#define HEIGHT 360
15 16
16static Ecore_Wl2_Display *
17_display_connect(void)
18{
19 Ecore_Wl2_Display *disp;
20
21 disp = ecore_wl2_display_connect(NULL);
22 return disp;
23}
24
25static Ecore_Wl2_Window * 17static Ecore_Wl2_Window *
26_window_create(Ecore_Wl2_Display *disp) 18_window_create(Ecore_Wl2_Display *disp)
27{ 19{
diff --git a/src/tests/ecore_wl2/ecore_wl2_tests_helpers.h b/src/tests/ecore_wl2/ecore_wl2_tests_helpers.h
index f897dc9123..257838f50c 100644
--- a/src/tests/ecore_wl2/ecore_wl2_tests_helpers.h
+++ b/src/tests/ecore_wl2/ecore_wl2_tests_helpers.h
@@ -4,21 +4,9 @@
4# include <Ecore_Wl2.h> 4# include <Ecore_Wl2.h>
5 5
6static Ecore_Wl2_Display * 6static Ecore_Wl2_Display *
7_display_setup(void)
8{
9 Ecore_Wl2_Display *disp;
10
11 disp = ecore_wl2_display_create(NULL);
12 return disp;
13}
14
15static Ecore_Wl2_Display *
16_display_connect(void) 7_display_connect(void)
17{ 8{
18 Ecore_Wl2_Display *disp; 9 return ecore_wl2_display_connect(NULL);
19
20 disp = ecore_wl2_display_connect(NULL);
21 return disp;
22} 10}
23 11
24#endif 12#endif