mirror of
https://github.com/gabime/spdlog.git
synced 2025-04-30 04:23:51 +00:00
clang-format
This commit is contained in:
parent
18f0e4ba1a
commit
617fcc92cf
@ -3,10 +3,6 @@
|
|||||||
// Distributed under the MIT License (http://opensource.org/licenses/MIT)
|
// Distributed under the MIT License (http://opensource.org/licenses/MIT)
|
||||||
//
|
//
|
||||||
|
|
||||||
//
|
|
||||||
// latency.cpp : spdlog latency benchmarks
|
|
||||||
//
|
|
||||||
|
|
||||||
#include "benchmark/benchmark.h"
|
#include "benchmark/benchmark.h"
|
||||||
|
|
||||||
#include "spdlog/spdlog.h"
|
#include "spdlog/spdlog.h"
|
||||||
@ -31,10 +27,7 @@ void bench_scoped_pad(benchmark::State &state, size_t wrapped_size, spdlog::deta
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
|
||||||
using spdlog::details::padding_info;
|
using spdlog::details::padding_info;
|
||||||
spdlog::set_pattern("[tid %t] %v");
|
|
||||||
|
|
||||||
std::vector<size_t> sizes = {0, 2, 4, 8, 16, 32, 64, 128};
|
std::vector<size_t> sizes = {0, 2, 4, 8, 16, 32, 64, 128};
|
||||||
|
|
||||||
for (auto size : sizes)
|
for (auto size : sizes)
|
||||||
|
@ -181,22 +181,16 @@ TEST_CASE("center_padded_short", "[pattern_formatter]")
|
|||||||
|
|
||||||
TEST_CASE("left_padded_huge", "[pattern_formatter]")
|
TEST_CASE("left_padded_huge", "[pattern_formatter]")
|
||||||
{
|
{
|
||||||
REQUIRE(log_to_str("Some message", "[%-300n] %v", spdlog::pattern_time_type::local, "\n") == "[pattern_tester ]"
|
REQUIRE(
|
||||||
" Some message\n");
|
log_to_str("Some message", "[%-300n] %v", spdlog::pattern_time_type::local, "\n") ==
|
||||||
|
"[pattern_tester ]"
|
||||||
|
" Some message\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_CASE("left_padded_max", "[pattern_formatter]")
|
TEST_CASE("left_padded_max", "[pattern_formatter]")
|
||||||
{
|
{
|
||||||
REQUIRE(log_to_str("Some message", "[%-128n] %v", spdlog::pattern_time_type::local, "\n") == "[pattern_tester ]"
|
REQUIRE(
|
||||||
" Some message\n");
|
log_to_str("Some message", "[%-128n] %v", spdlog::pattern_time_type::local, "\n") ==
|
||||||
|
"[pattern_tester ]"
|
||||||
|
" Some message\n");
|
||||||
}
|
}
|
||||||
//
|
|
||||||
//TEST_CASE("right_padded_huge", "[pattern_formatter]")
|
|
||||||
//{
|
|
||||||
// REQUIRE(log_to_str("Some message", "[%-3n] %v", spdlog::pattern_time_type::local, "\n") == "[pattern_tester] Some message\n");
|
|
||||||
//}
|
|
||||||
//
|
|
||||||
//TEST_CASE("center_padded_huge", "[pattern_formatter]")
|
|
||||||
//{
|
|
||||||
// REQUIRE(log_to_str("Some message", "[%=3n] %v", spdlog::pattern_time_type::local, "\n") == "[pattern_tester] Some message\n");
|
|
||||||
//}
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user