Test enabled formatters
This commit is contained in:
parent
e01579231d
commit
cc805c6162
@ -45,6 +45,22 @@ using testing::StrictMock;
|
||||
|
||||
namespace {
|
||||
|
||||
template <typename T>
|
||||
bool check_enabled_formatter() {
|
||||
static_assert(std::is_default_constructible<fmt::formatter<T>>::value, "");
|
||||
return true;
|
||||
}
|
||||
|
||||
template <typename... T>
|
||||
void check_enabled_formatters() {
|
||||
auto dummy = {check_enabled_formatter<T>()...};
|
||||
(void)dummy;
|
||||
}
|
||||
|
||||
TEST(FormatterTest, TestFormattersEnabled) {
|
||||
check_enabled_formatters<char, signed char, unsigned char>();
|
||||
}
|
||||
|
||||
// Format value using the standard library.
|
||||
template <typename Char, typename T>
|
||||
void std_format(const T &value, std::basic_string<Char> &result) {
|
||||
|
Loading…
Reference in New Issue
Block a user