|
|
|
@ -1,28 +1,27 @@
|
|
|
|
|
|
|
|
|
|
#include "includes.h"
|
|
|
|
|
|
|
|
|
|
void test_pad2(int n, const char* expected)
|
|
|
|
|
void test_pad2(int n, const char *expected)
|
|
|
|
|
{
|
|
|
|
|
fmt::memory_buffer buf;
|
|
|
|
|
spdlog::details::fmt_helper::pad2(n, buf);
|
|
|
|
|
REQUIRE(fmt::to_string(buf) == expected);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void test_pad3(int n, const char* expected)
|
|
|
|
|
void test_pad3(int n, const char *expected)
|
|
|
|
|
{
|
|
|
|
|
fmt::memory_buffer buf;
|
|
|
|
|
spdlog::details::fmt_helper::pad3(n, buf);
|
|
|
|
|
REQUIRE(fmt::to_string(buf) == expected);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void test_pad6(std::size_t n, const char* expected)
|
|
|
|
|
void test_pad6(std::size_t n, const char *expected)
|
|
|
|
|
{
|
|
|
|
|
fmt::memory_buffer buf;
|
|
|
|
|
spdlog::details::fmt_helper::pad6(n, buf);
|
|
|
|
|
REQUIRE(fmt::to_string(buf) == expected);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
TEST_CASE("pad2", "[fmt_helper]")
|
|
|
|
|
{
|
|
|
|
|
test_pad2(0, "00");
|
|
|
|
@ -43,7 +42,6 @@ TEST_CASE("pad3", "[fmt_helper]")
|
|
|
|
|
test_pad3(-5, "-05");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
TEST_CASE("pad6", "[fmt_helper]")
|
|
|
|
|
{
|
|
|
|
|
test_pad6(0, "000000");
|
|
|
|
@ -54,4 +52,3 @@ TEST_CASE("pad6", "[fmt_helper]")
|
|
|
|
|
test_pad6(12345, "012345");
|
|
|
|
|
test_pad6(123456, "123456");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|