[Request]Update Flora license version
[apps/home/libslp-alarm.git] / TC / unit / utc_alarmdb_free_data_func.c
1 /*
2 *
3 * Copyright 2012  Samsung Electronics Co., Ltd
4 *
5 * Licensed under the Flora License, Version 1.1 (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_free_data_func.h"
25
26 /***************************************
27 * add Test Case Wide Declarations
28 * e.g.,
29 * static char msg[256];
30 ***************************************/
31 struct alarm_data *ad;
32
33 static void startup()
34 {
35         tet_printf("\n TC startup");
36         /* add your code here */
37         int ret;
38         ret = alarmdb_init(NULL);
39         if (!ret)
40                 tet_printf("\n alarmdb_init succeed!");
41
42         ad = alarmdb_create_data();
43         if (ad == NULL)
44                 tet_printf("\n failed to create data");
45 }
46
47 static void cleanup()
48 {
49         tet_printf("\n TC End");
50         /* add your code here */
51         alarmdb_fini();
52 }
53
54 /***************************************
55 * Add your callback function here
56 * if needed
57 ***************************************/
58
59 /***************************************
60 * add your Test Cases
61 * e.g.,
62 * static void utc_ApplicationLib_recurGetDayOfWeek_01()
63 * {
64 *   int ret;
65 *
66 *   ret = target_api();
67 *   if(ret == 1)
68 *       tet_result(TET_PASS);
69 *   else
70 *       tet_result(TET_FAIL);
71 * }
72 *
73 * static void utc_ApplicationLib_recurGetDayOfWeek_02()
74 * {
75 *       code..
76 *       condition1
77 *           tet_result(TET_PASS);
78 *       condition2
79 *           tet_result(TET_FAIL);
80 * }
81 *
82 ***************************************/
83
84 static void utc_alarmdb_free_data_func_01()
85 {
86         alarmdb_free_data(ad);
87         tet_result(TET_PASS);
88 }