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