tizen 2.3.1 release
[framework/appfw/alarm-manager.git] / TC / unit / utc_ApplicationFW_alarmmgr_create_alarm_func.c
1 /*
2  *  alarm-manager
3  *
4  * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
5  *
6  * Contact: Venkatesha Sarpangala <sarpangala.v@samsung.com>, Jayoun Lee <airjany@samsung.com>,
7  * Sewook Park <sewook7.park@samsung.com>, Jaeho Lee <jaeho81.lee@samsung.com>
8  *
9  * Licensed under the Apache License, Version 2.0 (the "License");
10  * you may not use this file except in compliance with the License.
11  * You may obtain a copy of the License at
12  *
13  * http://www.apache.org/licenses/LICENSE-2.0
14  *
15  * Unless required by applicable law or agreed to in writing, software
16  * distributed under the License is distributed on an "AS IS" BASIS,
17  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18  * See the License for the specific language governing permissions and
19  * limitations under the License.
20  *
21  */
22 #include <stdio.h>
23 #include <stdlib.h>
24 #include <time.h>
25 #include <tet_api.h>
26 #include <sys/types.h>
27 #include <unistd.h>
28
29 #include "alarm.h"
30
31 static void startup(void);
32 static void cleanup(void);
33
34 void (*tet_startup)(void) = startup;
35 void (*tet_cleanup)(void) = cleanup;
36
37 static void utc_ApplicationFW_alarmmgr_create_alarm_func_01(void);
38
39 enum {
40         POSITIVE_TC_IDX = 0x01,
41         NEGATIVE_TC_IDX,
42 };
43
44 struct tet_testlist tet_testlist[] = {
45         { utc_ApplicationFW_alarmmgr_create_alarm_func_01, POSITIVE_TC_IDX },
46         { NULL , 0 }
47 };
48
49 static int pid;
50
51 static void startup(void)
52 {
53 }
54
55 static void cleanup(void)
56 {
57 }
58
59 /**
60  * @brief Positive test case of alarmmgr_create_alarm()
61  */
62 static void utc_ApplicationFW_alarmmgr_create_alarm_func_01(void)
63 {
64         alarm_entry_t* alarm;
65
66         alarm = alarmmgr_create_alarm() ;
67         if(alarm != NULL)
68         {
69                  tet_infoline("\nAlarm Manager : call to alarmmgr_create_alarm() is successful \n");
70                  tet_result(TET_PASS);
71         }
72         else
73         {
74                  tet_infoline("\nAlarm Manager : call to alarmmgr_create_alarm () failed \n");
75                  tet_result(TET_FAIL);
76         }
77 }
78