mirror of
https://github.com/gabime/spdlog.git
synced 2024-12-25 01:51:38 +08: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)
|
||||
//
|
||||
|
||||
//
|
||||
// latency.cpp : spdlog latency benchmarks
|
||||
//
|
||||
|
||||
#include "benchmark/benchmark.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[])
|
||||
{
|
||||
|
||||
using spdlog::details::padding_info;
|
||||
spdlog::set_pattern("[tid %t] %v");
|
||||
|
||||
std::vector<size_t> sizes = {0, 2, 4, 8, 16, 32, 64, 128};
|
||||
|
||||
for (auto size : sizes)
|
||||
|
@ -181,22 +181,16 @@ TEST_CASE("center_padded_short", "[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 ]"
|
||||
" Some message\n");
|
||||
REQUIRE(
|
||||
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]")
|
||||
{
|
||||
REQUIRE(log_to_str("Some message", "[%-128n] %v", spdlog::pattern_time_type::local, "\n") == "[pattern_tester ]"
|
||||
" Some message\n");
|
||||
REQUIRE(
|
||||
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…
Reference in New Issue
Block a user