Unified usage of fmt::memory_buffer across the codebase

This commit is contained in:
gabime
2019-08-28 18:46:09 +03:00
parent c2efd6ee58
commit f5492aed12
29 changed files with 123 additions and 126 deletions

View File

@@ -2,30 +2,32 @@
#include "includes.h"
#include "spdlog/details/fmt_helper.h"
using spdlog::memory_buf_t;
void test_pad2(int n, const char *expected)
{
fmt::memory_buffer buf;
memory_buf_t buf;
spdlog::details::fmt_helper::pad2(n, buf);
REQUIRE(fmt::to_string(buf) == expected);
}
void test_pad3(uint32_t n, const char *expected)
{
fmt::memory_buffer buf;
memory_buf_t buf;
spdlog::details::fmt_helper::pad3(n, buf);
REQUIRE(fmt::to_string(buf) == expected);
}
void test_pad6(std::size_t n, const char *expected)
{
fmt::memory_buffer buf;
memory_buf_t buf;
spdlog::details::fmt_helper::pad6(n, buf);
REQUIRE(fmt::to_string(buf) == expected);
}
void test_pad9(std::size_t n, const char *expected)
{
fmt::memory_buffer buf;
memory_buf_t buf;
spdlog::details::fmt_helper::pad9(n, buf);
REQUIRE(fmt::to_string(buf) == expected);
}