Tizen 2.1 base
[apps/home/libslp-alarm.git] / TC / unit / utc_alarmdb_create_data_func.c
1 /*
2 *
3 * Copyright 2012  Samsung Electronics Co., Ltd
4 *
5 * Licensed under the Flora License, Version 1.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 *    http://floralicense.org/license/
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 *
17 */
18
19 /***************************************
20 * add your header file here
21 * e.g.,
22 * #include "utc_ApplicationLib_recurGetDayOfWeek_func.h"
23 ***************************************/
24 #include "utc_alarmdb_create_data_func.h"
25
26 /***************************************
27 * add Test Case Wide Declarations
28 * e.g.,
29 * static char msg[256];
30 ***************************************/
31
32 struct alarm_data *ad;
33
34 static void startup()
35 {
36         tet_printf("\n TC startup");
37         /* add your code here */
38         int ret;
39         ret = alarmdb_init(NULL);
40         if (!ret)
41                 tet_printf("\n alarmdb_init succeed!");
42 }
43
44 static void cleanup()
45 {
46         tet_printf("\n TC End");
47         /* add your code here */
48         if (ad)
49                 alarmdb_free_data(ad);
50         alarmdb_fini();
51 }
52
53 /***************************************
54 * Add your callback function here
55 * if needed
56 ***************************************/
57
58 /***************************************
59 * add your Test Cases
60 * e.g.,
61 * static void utc_ApplicationLib_recurGetDayOfWeek_01()
62 * {
63 *   int ret;
64 *
65 *   ret = target_api();
66 *   if(ret == 1)
67 *       tet_result(TET_PASS);
68 *   else
69 *       tet_result(TET_FAIL);
70 * }
71 *
72 * static void utc_ApplicationLib_recurGetDayOfWeek_02()
73 * {
74 *       code..
75 *       condition1
76 *           tet_result(TET_PASS);
77 *       condition2
78 *           tet_result(TET_FAIL);
79 * }
80 *
81 ***************************************/
82
83 static void utc_alarmdb_create_data_func_01()
84 {
85         struct alarm_data *ret;
86
87         ret = alarmdb_create_data();
88         ad = ret;
89         if (ret != NULL)
90                 tet_result(TET_PASS);
91         else
92                 tet_result(TET_FAIL);
93 }