{
#if HAVE_ECORE_WL2
{ "Ecore_Wl2", ecore_wl2_test_init },
+ { "Display", ecore_wl2_test_display },
#endif
{ NULL, NULL }
};
# include "../efl_check.h"
void ecore_wl2_test_init(TCase *tc);
+void ecore_wl2_test_display(TCase *tc);
#endif
--- /dev/null
+#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"
+#include "ecore_wl2_tests_helpers.h"
+
+EFL_START_TEST(wl2_display_create)
+{
+ Ecore_Wl2_Display *disp;
+
+ disp = ECORE_WL2_TEST_DISPLAY_SETUP();
+ ck_assert(disp != NULL);
+}
+EFL_END_TEST
+
+EFL_START_TEST(wl2_display_destroy)
+{
+ Ecore_Wl2_Display *disp;
+
+ disp = ECORE_WL2_TEST_DISPLAY_SETUP();
+ ck_assert(disp != NULL);
+
+ ecore_wl2_display_destroy(disp);
+}
+EFL_END_TEST
+
+void
+ecore_wl2_test_display(TCase *tc)
+{
+ tcase_add_test(tc, wl2_display_create);
+ tcase_add_test(tc, wl2_display_destroy);
+}
--- /dev/null
+#ifndef ECORE_WL2_TEST_HELPERS_H
+# define ECORE_WL2_TEST_HELPERS_H
+
+# include <Ecore_Wl2.h>
+
+# define ECORE_WL2_TEST_DISPLAY_SETUP() _setup_display()
+
+static Ecore_Wl2_Display *
+_setup_display(void)
+{
+ Ecore_Wl2_Display *disp;
+
+ disp = ecore_wl2_display_create(NULL);
+ return disp;
+}
+
+#endif
ecore_wl2_suite_src = [
'ecore_wl2_suite.c',
'ecore_wl2_suite.h',
- 'ecore_wl2_test_ecore_wl2.c'
+ 'ecore_wl2_tests_helpers.h',
+ 'ecore_wl2_test_ecore_wl2.c',
+ 'ecore_wl2_test_display.c'
]
ecore_wl2_suite = executable('ecore_wl2_suite',