2 * unit_test_fw_log_suite.c
4 * Created on: 2011. 9. 25.
8 #include "unit_test_common.h"
9 #include "suites/unit_test_fw_log_suite.h"
10 #include "Utility/fw_log.h"
12 /* test external interfaces */
14 #define LOG_TAG "UNIT_TEST_FW_LOG"
16 START_TEST(_color_logging_test)
18 /* first example : logging with default option */
19 FW_LOGV("print with default option !");
21 /* second example : logging with background color & word color */
22 /* note that in below code, FW_TM_OPT_RED_WORD & FW_TM_OPT_WHITE_BACKGROUND is separated by space operator */
23 /* and the order is not important */
24 FW_LOGV_WITH_TERMINAL_OPTION(FW_TM_OPT_RED_WORD FW_TM_OPT_WHITE_BACKGROUND, "print red word in white background !");
26 /* third example : setting only word color */
27 FW_LOGV_WITH_TERMINAL_OPTION(FW_TM_OPT_GREEN_WORD, "print green word in default background !");
29 /* second example : setting only background color */
30 FW_LOGV_WITH_TERMINAL_OPTION(FW_TM_OPT_BLUE_BACKGROUND, "print default color word in blue background !");
33 END_TEST Suite *fw_log_suite(void)
35 /* create test suite */
36 Suite *s = suite_create("fw_logging");
38 /* test case create and add in suite */
40 TCase *tcase = tcase_create("color logging test");
42 tcase_add_test(tcase, _color_logging_test);
43 tcase_set_timeout(tcase, 1);
45 suite_add_tcase(s, tcase);