tizen 2.3.1 release
[framework/system/dlog.git] / TC / unit / utc_ApplicationFW_dlog_print_func.c
1 #include <tet_api.h>
2 #include "dlog.h"
3 #define LOG_BUF_SIZE 1024
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_ApplicationFW_dlog_print_func_01(void);
11 static void utc_ApplicationFW_dlog_print_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_ApplicationFW_dlog_print_func_01, POSITIVE_TC_IDX },
20         { utc_ApplicationFW_dlog_print_func_02, NEGATIVE_TC_IDX },
21         { NULL, 0 }
22 };
23
24 //static int pid;
25
26 static void startup(void)
27 {
28 }
29
30 static void cleanup(void)
31 {
32 }
33
34 /**
35  * @brief Positive test case of dlog_print()
36  */
37 static void utc_ApplicationFW_dlog_print_func_01(void)
38 {
39         int r = 0;
40
41         r = dlog_print(DLOG_DEBUG, "DLOG_TEST", "dlog test message for tetware\n");
42
43         if (r<0) {
44                 tet_printf("dlog_print() 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 dlog_print()
53  */
54 static void utc_ApplicationFW_dlog_print_func_02(void)
55 {
56         int r = 0;
57
58         r = dlog_print(DLOG_UNKNOWN, "DLOG_TEST", "dlog test message for tetware\n");
59
60         if (r>=0) {
61                 tet_printf("dlog_print() failed in negative test case");
62                 tet_result(TET_FAIL);
63                 return;
64         }
65         tet_result(TET_PASS);
66 }