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