|
1 | 1 | #include <log/fmt/logger.hpp>
|
2 | 2 |
|
3 | 3 | #include <stdx/ct_string.hpp>
|
| 4 | +#include <stdx/utility.hpp> |
4 | 5 |
|
5 | 6 | #include <catch2/catch_test_macros.hpp>
|
6 | 7 |
|
@@ -61,49 +62,49 @@ TEST_CASE("log levels are properly represented", "[fmt_logger]") {
|
61 | 62 | {
|
62 | 63 | std::string level{};
|
63 | 64 | fmt::format_to(std::back_inserter(level), "{}",
|
64 |
| - logging::level_constant<logging::level::TRACE>{}); |
| 65 | + stdx::ct<logging::level::TRACE>()); |
65 | 66 | CHECK(level == "TRACE");
|
66 | 67 | }
|
67 | 68 | {
|
68 | 69 | std::string level{};
|
69 | 70 | fmt::format_to(std::back_inserter(level), "{}",
|
70 |
| - logging::level_constant<logging::level::INFO>{}); |
| 71 | + stdx::ct<logging::level::INFO>()); |
71 | 72 | CHECK(level == "INFO");
|
72 | 73 | }
|
73 | 74 | {
|
74 | 75 | std::string level{};
|
75 | 76 | fmt::format_to(std::back_inserter(level), "{}",
|
76 |
| - logging::level_constant<logging::level::WARN>{}); |
| 77 | + stdx::ct<logging::level::WARN>()); |
77 | 78 | CHECK(level == "WARN");
|
78 | 79 | }
|
79 | 80 | {
|
80 | 81 | std::string level{};
|
81 | 82 | fmt::format_to(std::back_inserter(level), "{}",
|
82 |
| - logging::level_constant<logging::level::ERROR>{}); |
| 83 | + stdx::ct<logging::level::ERROR>()); |
83 | 84 | CHECK(level == "ERROR");
|
84 | 85 | }
|
85 | 86 | {
|
86 | 87 | std::string level{};
|
87 | 88 | fmt::format_to(std::back_inserter(level), "{}",
|
88 |
| - logging::level_constant<logging::level::FATAL>{}); |
| 89 | + stdx::ct<logging::level::FATAL>()); |
89 | 90 | CHECK(level == "FATAL");
|
90 | 91 | }
|
91 | 92 | {
|
92 | 93 | std::string level{};
|
93 | 94 | fmt::format_to(std::back_inserter(level), "{}",
|
94 |
| - logging::level_constant<logging::level::MAX>{}); |
| 95 | + stdx::ct<logging::level::MAX>()); |
95 | 96 | CHECK(level == "MAX");
|
96 | 97 | }
|
97 | 98 | {
|
98 | 99 | std::string level{};
|
99 | 100 | fmt::format_to(std::back_inserter(level), "{}",
|
100 |
| - logging::level_constant<logging::level::USER1>{}); |
| 101 | + stdx::ct<logging::level::USER1>()); |
101 | 102 | CHECK(level == "USER1");
|
102 | 103 | }
|
103 | 104 | {
|
104 | 105 | std::string level{};
|
105 | 106 | fmt::format_to(std::back_inserter(level), "{}",
|
106 |
| - logging::level_constant<logging::level::USER2>{}); |
| 107 | + stdx::ct<logging::level::USER2>()); |
107 | 108 | CHECK(level == "USER2");
|
108 | 109 | }
|
109 | 110 | }
|
|
0 commit comments