Tizen 2.1 base
[platform/core/multimedia/libmm-radio.git] / test / mm_radio_test_type.h
1 /*
2  * libmm-radio
3  *
4  * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
5  *
6  * Contact: JongHyuk Choi <jhchoi.choi@samsung.com>, YoungHwan An <younghwan_.an@samsung.com>
7  *
8  * Licensed under the Apache License, Version 2.0 (the "License");
9  * you may not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  *
12  * http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS,
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  *
20  */
21
22 #ifndef MM_RADIO_TEST_TYPE_H_
23 #define MM_RADIO_TEST_TYPE_H_
24
25 #include <stdio.h>
26 #include <assert.h>
27
28 typedef int (*test_function) (void);
29
30 typedef struct __test_item
31 {
32         char menu_string[80];
33         char description[128];
34         test_function func;
35         int result;
36 } test_item_t;
37
38 #define RADIO_TEST__(x_test)    \
39                 ret = x_test    \
40                 if ( ! ret )    \
41                 {       \
42                         printf("PASS : %s -- %s:%d\n", #x_test, __FILE__, __LINE__);    \
43                 }       \
44                 else    \
45                 {       \
46                         printf("FAIL : %s ERR-CODE : 0x%x -- %s:%d\n", #x_test, ret, __FILE__, __LINE__);       \
47                 }
48
49 #endif /* MM_RADIO_TEST_TYPE_H_ */