support gcov test
[platform/core/pim/contacts-service.git] / test / test_debug.h
1 /*
2  * Copyright (c) 2016 Samsung Electronics Co., Ltd.
3  *
4  * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
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 #ifndef __TEST_DEBUG_H__
18 #define __TEST_DEBUG_H__
19
20 #include <dlog.h>
21 #include <string.h>
22
23 #ifdef LOG_TAG
24 #undef LOG_TAG
25 #endif
26
27 #define LOG_TAG "CONTACTS_SERVICE_TEST"
28
29 #define COLOR_RED         "\033[0;31m"
30 #define COLOR_GREEN       "\033[0;32m"
31 #define COLOR_BROWN       "\033[0;33m"
32 #define COLOR_LIGHTYELLOW "\033[1;33m"
33 #define COLOR_BLUE        "\033[0;34m"
34 #define COLOR_PURPLE      "\033[0;35m"
35 #define COLOR_CYAN        "\033[0;36m"
36 #define COLOR_LIGHTBLUE   "\033[0;37m"
37 #define COLOR_END         "\033[0;m"
38
39 #define DBG(fmt, args...)  LOGD(COLOR_CYAN" [TEST] "COLOR_END fmt, ##args)
40 #define VERB(fmt, args...) LOGD(COLOR_BROWN" [TEST] "COLOR_END fmt, ##args)
41 #define WARN(fmt, args...) LOGD(COLOR_PURPLE fmt COLOR_END, ##args)
42 #define ERR(fmt, args...)  LOGE(COLOR_RED" [TEST] "COLOR_END fmt, ##args)
43 #define ENTER()            LOGD(COLOR_GREEN" BEGIN >>>> "COLOR_END)
44 #define LEAVE()            LOGD(COLOR_GREEN" END <<<< "COLOR_END)
45
46 #endif /* __TEST_DEBUG_H__ */