mirror of
https://github.com/gabime/spdlog.git
synced 2025-09-28 17:19:34 +08:00
Unified usage of fmt::memory_buffer across the codebase
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user