forked from enlightenment/efl
tests: Add file for Ecore_Wl2 display tests
Add file which can be used to add tests for ecore_wl2 display functions ref T8016
This commit is contained in:
parent
3b28a0a0f5
commit
73acf72cc4
|
@ -10,6 +10,7 @@ static const Efl_Test_Case etc[] =
|
||||||
{
|
{
|
||||||
#if HAVE_ECORE_WL2
|
#if HAVE_ECORE_WL2
|
||||||
{ "Ecore_Wl2", ecore_wl2_test_init },
|
{ "Ecore_Wl2", ecore_wl2_test_init },
|
||||||
|
{ "Display", ecore_wl2_test_display },
|
||||||
#endif
|
#endif
|
||||||
{ NULL, NULL }
|
{ NULL, NULL }
|
||||||
};
|
};
|
||||||
|
|
|
@ -5,5 +5,6 @@
|
||||||
# include "../efl_check.h"
|
# include "../efl_check.h"
|
||||||
|
|
||||||
void ecore_wl2_test_init(TCase *tc);
|
void ecore_wl2_test_init(TCase *tc);
|
||||||
|
void ecore_wl2_test_display(TCase *tc);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -0,0 +1,39 @@
|
||||||
|
#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);
|
||||||
|
}
|
|
@ -0,0 +1,17 @@
|
||||||
|
#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
|
|
@ -1,7 +1,9 @@
|
||||||
ecore_wl2_suite_src = [
|
ecore_wl2_suite_src = [
|
||||||
'ecore_wl2_suite.c',
|
'ecore_wl2_suite.c',
|
||||||
'ecore_wl2_suite.h',
|
'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',
|
ecore_wl2_suite = executable('ecore_wl2_suite',
|
||||||
|
|
Loading…
Reference in New Issue