forked from enlightenment/efl
ecore_drm: Added test case calling ecore_drm_shutdown before calling ecore_drm_init.
Summary: _ecore_drm_init_count should not go below zero. So added test case to verify that. Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com> Reviewers: devilhorns Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D1589
This commit is contained in:
parent
e164d14208
commit
17d0b98971
|
@ -11,6 +11,24 @@
|
||||||
|
|
||||||
#define MAX_ITER 10
|
#define MAX_ITER 10
|
||||||
|
|
||||||
|
START_TEST(ecore_test_ecore_drm_shutdown_bef_init)
|
||||||
|
{
|
||||||
|
int ret = 0;
|
||||||
|
|
||||||
|
ret = ecore_drm_shutdown();
|
||||||
|
fprintf(stderr, "Calling ecore_drm_shutdown without calling ecore_drm_init.\n");
|
||||||
|
fail_if(ret != 0);
|
||||||
|
|
||||||
|
ret = ecore_drm_init();
|
||||||
|
fprintf(stderr, "Calling ecore_drm_init.\n");
|
||||||
|
fail_if(ret != 1);
|
||||||
|
|
||||||
|
ret = ecore_drm_shutdown();
|
||||||
|
fprintf(stderr, "Calling ecore_drm_shutdown after ecore_drm_init.\n");
|
||||||
|
fail_if(ret != 0);
|
||||||
|
}
|
||||||
|
END_TEST
|
||||||
|
|
||||||
START_TEST(ecore_test_ecore_drm_init)
|
START_TEST(ecore_test_ecore_drm_init)
|
||||||
{
|
{
|
||||||
int ret, i, j;
|
int ret, i, j;
|
||||||
|
@ -34,4 +52,5 @@ END_TEST
|
||||||
void ecore_test_ecore_drm(TCase *tc)
|
void ecore_test_ecore_drm(TCase *tc)
|
||||||
{
|
{
|
||||||
tcase_add_test(tc, ecore_test_ecore_drm_init);
|
tcase_add_test(tc, ecore_test_ecore_drm_init);
|
||||||
|
tcase_add_test(tc, ecore_test_ecore_drm_shutdown_bef_init);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue