summaryrefslogtreecommitdiff
path: root/src/tests/ecore/ecore_test_ecore_input.c
blob: 6d0420eb64b99ec042b0d406825144a272653cb8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif

#include <stdio.h>
#include <unistd.h>

#include <Ecore_Input.h>

#include "ecore_suite.h"

#define MAX_ITER 10

EFL_START_TEST(ecore_test_ecore_input_init)
{
   int ret, i, j;

   for (i = 1; i <= MAX_ITER; i++)
     {
        ret = ecore_event_init();
        fail_if(ret != i);
     }

   for (j = MAX_ITER - 1; j >= 0; j--)
     {
        ret = ecore_event_shutdown();
        fail_if(ret != j);
     }
}
EFL_END_TEST

void ecore_test_ecore_input(TCase *tc)
{
   tcase_add_test(tc, ecore_test_ecore_input_init);
}