Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
spdlog
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
spdlog
Commits
617fcc92
Commit
617fcc92
authored
Nov 11, 2018
by
gabime
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
clang-format
parent
18f0e4ba
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
21 deletions
+8
-21
bench/padder_bench.cpp
bench/padder_bench.cpp
+0
-7
tests/test_pattern_formatter.cpp
tests/test_pattern_formatter.cpp
+8
-14
No files found.
bench/padder_bench.cpp
View file @
617fcc92
...
...
@@ -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
)
...
...
tests/test_pattern_formatter.cpp
View file @
617fcc92
...
...
@@ -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");
//}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment