Tizen 2.0 Release
[framework/appfw/libslp-db-util.git] / TC / unit / utc_MODULE_API_func.c.in
1 #include <tet_api.h>
2
3 static void startup(void);
4 static void cleanup(void);
5
6 void (*tet_startup)(void) = startup;
7 void (*tet_cleanup)(void) = cleanup;
8
9 static void utc_@MODULE@_@API@_func_01(void);
10 static void utc_@MODULE@_@API@_func_02(void);
11
12 enum {
13         POSITIVE_TC_IDX = 0x01,
14         NEGATIVE_TC_IDX,
15 };
16
17 struct tet_testlist tet_testlist[] = {
18         { utc_@MODULE@_@API@_func_01, POSITIVE_TC_IDX },
19         { utc_@MODULE@_@API@_func_02, NEGATIVE_TC_IDX },
20 };
21
22 static void startup(void)
23 {
24 }
25
26 static void cleanup(void)
27 {
28 }
29
30 /**
31  * @brief Positive test case of @API@()
32  */
33 static void utc_@MODULE@_@API@_func_01(void)
34 {
35         int r = 0;
36
37         r = @API@(...);
38
39         if (r<0) {
40                 tet_infoline("@API@() failed in positive test case");
41                 tet_result(TET_FAIL);
42                 return;
43         }
44         tet_result(TET_PASS);
45 }
46
47 /**
48  * @brief Negative test case of ug_init @API@()
49  */
50 static void utc_@MODULE@_@API@_func_02(void)
51 {
52         int r = 0;
53
54         r = @API@(...);
55
56         if (r>=0) {
57                 tet_infoline("@API@() failed in negative test case");
58                 tet_result(TET_FAIL);
59                 return;
60         }
61         tet_result(TET_PASS);
62 }