44 UCX_TEST_ASSERT(logger->writer == (write_func)fwrite, |
44 UCX_TEST_ASSERT(logger->writer == (write_func)fwrite, |
45 "writer not set to fwrite"); |
45 "writer not set to fwrite"); |
46 UCX_TEST_ASSERT(strcmp(logger->dateformat, "%F %T %z ") == 0, |
46 UCX_TEST_ASSERT(strcmp(logger->dateformat, "%F %T %z ") == 0, |
47 "date format not set to \"%F %T %z\""); |
47 "date format not set to \"%F %T %z\""); |
48 |
48 |
49 UCX_TEST_ASSERT(logger->levels->count == 4, |
49 UCX_TEST_ASSERT(logger->levels->count == 5, |
50 "incorrect number of registered log levels"); |
50 "incorrect number of registered log levels"); |
51 |
51 |
52 int level = UCX_LOGGER_ERROR; |
52 int level = UCX_LOGGER_ERROR; |
53 UCX_TEST_ASSERT(strcmp((char*)ucx_map_int_get(logger->levels, level), |
53 UCX_TEST_ASSERT(strcmp((char*)ucx_map_int_get(logger->levels, level), |
54 "[ERROR]") == 0, "invalid error level"); |
54 "[ERROR]") == 0, "invalid error level"); |
55 level = UCX_LOGGER_WARN; |
55 level = UCX_LOGGER_WARN; |
56 UCX_TEST_ASSERT(strcmp((char*)ucx_map_int_get(logger->levels, level), |
56 UCX_TEST_ASSERT(strcmp((char*)ucx_map_int_get(logger->levels, level), |
57 "[WARNING]") == 0, "invalid warning level"); |
57 "[WARNING]") == 0, "invalid warning level"); |
|
58 level = UCX_LOGGER_DEBUG; |
|
59 UCX_TEST_ASSERT(strcmp((char*)ucx_map_int_get(logger->levels, level), |
|
60 "[DEBUG]") == 0, "invalid debug level"); |
58 level = UCX_LOGGER_INFO; |
61 level = UCX_LOGGER_INFO; |
59 UCX_TEST_ASSERT(strcmp((char*)ucx_map_int_get(logger->levels, level), |
62 UCX_TEST_ASSERT(strcmp((char*)ucx_map_int_get(logger->levels, level), |
60 "[INFO]") == 0, "invalid info level"); |
63 "[INFO]") == 0, "invalid info level"); |
61 level = UCX_LOGGER_TRACE; |
64 level = UCX_LOGGER_TRACE; |
62 UCX_TEST_ASSERT(strcmp((char*)ucx_map_int_get(logger->levels, level), |
65 UCX_TEST_ASSERT(strcmp((char*)ucx_map_int_get(logger->levels, level), |