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
5c2855e1
Commit
5c2855e1
authored
Sep 05, 2019
by
gabime
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wip backtracer
parent
433785dc
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
198 additions
and
180 deletions
+198
-180
bench/bench.cpp
bench/bench.cpp
+0
-3
include/spdlog/details/backtracer-inl.h
include/spdlog/details/backtracer-inl.h
+74
-0
include/spdlog/details/backtracer.h
include/spdlog/details/backtracer.h
+24
-70
include/spdlog/details/circular_q.h
include/spdlog/details/circular_q.h
+87
-92
include/spdlog/logger-inl.h
include/spdlog/logger-inl.h
+2
-3
include/spdlog/sinks/daily_file_sink.h
include/spdlog/sinks/daily_file_sink.h
+2
-2
include/spdlog/sinks/rotating_file_sink-inl.h
include/spdlog/sinks/rotating_file_sink-inl.h
+5
-5
src/spdlog.cpp
src/spdlog.cpp
+1
-1
tests/test_misc.cpp
tests/test_misc.cpp
+3
-4
No files found.
bench/bench.cpp
View file @
5c2855e1
...
@@ -59,7 +59,6 @@ void bench_threaded_logging(int threads, int iters)
...
@@ -59,7 +59,6 @@ void bench_threaded_logging(int threads, int iters)
daily_mt_tracing
->
enable_backtrace
(
32
);
daily_mt_tracing
->
enable_backtrace
(
32
);
bench_mt
(
iters
,
std
::
move
(
daily_mt_tracing
),
threads
);
bench_mt
(
iters
,
std
::
move
(
daily_mt_tracing
),
threads
);
spdlog
::
info
(
""
);
spdlog
::
info
(
""
);
auto
empty_logger
=
std
::
make_shared
<
spdlog
::
logger
>
(
"level-off"
);
auto
empty_logger
=
std
::
make_shared
<
spdlog
::
logger
>
(
"level-off"
);
empty_logger
->
set_level
(
spdlog
::
level
::
off
);
empty_logger
->
set_level
(
spdlog
::
level
::
off
);
...
@@ -68,7 +67,6 @@ void bench_threaded_logging(int threads, int iters)
...
@@ -68,7 +67,6 @@ void bench_threaded_logging(int threads, int iters)
empty_logger_tracing
->
set_level
(
spdlog
::
level
::
off
);
empty_logger_tracing
->
set_level
(
spdlog
::
level
::
off
);
empty_logger_tracing
->
enable_backtrace
(
32
);
empty_logger_tracing
->
enable_backtrace
(
32
);
bench
(
iters
,
empty_logger_tracing
);
bench
(
iters
,
empty_logger_tracing
);
}
}
void
bench_single_threaded
(
int
iters
)
void
bench_single_threaded
(
int
iters
)
...
@@ -77,7 +75,6 @@ void bench_single_threaded(int iters)
...
@@ -77,7 +75,6 @@ void bench_single_threaded(int iters)
spdlog
::
info
(
"Single threaded: {:n} messages"
,
iters
);
spdlog
::
info
(
"Single threaded: {:n} messages"
,
iters
);
spdlog
::
info
(
"**************************************************************"
);
spdlog
::
info
(
"**************************************************************"
);
auto
basic_st
=
spdlog
::
basic_logger_st
(
"basic_st"
,
"logs/basic_st.log"
,
true
);
auto
basic_st
=
spdlog
::
basic_logger_st
(
"basic_st"
,
"logs/basic_st.log"
,
true
);
bench
(
iters
,
std
::
move
(
basic_st
));
bench
(
iters
,
std
::
move
(
basic_st
));
...
...
include/spdlog/details/backtracer-inl.h
0 → 100644
View file @
5c2855e1
// Copyright(c) 2015-present, Gabi Melman & spdlog contributors.
// Distributed under the MIT License (http://opensource.org/licenses/MIT)
#pragma once
#ifndef SPDLOG_HEADER_ONLY
#include "spdlog/details/backtracer.h"
#endif
namespace
spdlog
{
namespace
details
{
SPDLOG_INLINE
backtracer
::
backtracer
(
const
backtracer
&
other
)
{
std
::
lock_guard
<
std
::
mutex
>
lock
(
other
.
mutex_
);
enabled_
=
other
.
enabled
();
messages_
=
other
.
messages_
;
}
SPDLOG_INLINE
backtracer
::
backtracer
(
backtracer
&&
other
)
SPDLOG_NOEXCEPT
{
std
::
lock_guard
<
std
::
mutex
>
lock
(
other
.
mutex_
);
enabled_
=
other
.
enabled
();
messages_
=
std
::
move
(
other
.
messages_
);
}
SPDLOG_INLINE
backtracer
&
backtracer
::
operator
=
(
backtracer
other
)
{
std
::
lock_guard
<
std
::
mutex
>
lock
(
mutex_
);
enabled_
=
other
.
enabled
();
messages_
=
other
.
messages_
;
return
*
this
;
}
SPDLOG_INLINE
void
backtracer
::
enable
(
size_t
size
)
{
std
::
lock_guard
<
std
::
mutex
>
lock
{
mutex_
};
enabled_
.
store
(
true
,
std
::
memory_order_relaxed
);
messages_
=
circular_q
<
log_msg_buffer
>
{
size
};
}
SPDLOG_INLINE
void
backtracer
::
disable
()
{
std
::
lock_guard
<
std
::
mutex
>
lock
{
mutex_
};
enabled_
.
store
(
false
,
std
::
memory_order_relaxed
);
}
SPDLOG_INLINE
bool
backtracer
::
enabled
()
const
{
return
enabled_
.
load
(
std
::
memory_order_relaxed
);
}
SPDLOG_INLINE
backtracer
::
operator
bool
()
const
{
return
enabled
();
}
SPDLOG_INLINE
void
backtracer
::
push_back
(
const
log_msg
&
msg
)
{
std
::
lock_guard
<
std
::
mutex
>
lock
{
mutex_
};
messages_
.
push_back
(
log_msg_buffer
{
msg
});
}
// pop all items in the q and apply the given fun on each of them.
SPDLOG_INLINE
void
backtracer
::
foreach_pop
(
std
::
function
<
void
(
const
details
::
log_msg
&
)
>
fun
)
{
std
::
lock_guard
<
std
::
mutex
>
lock
{
mutex_
};
while
(
!
messages_
.
empty
())
{
log_msg_buffer
popped
;
messages_
.
pop_front
(
popped
);
fun
(
popped
);
}
}
}
// namespace details
}
// namespace spdlog
include/spdlog/details/backtracer.h
View file @
5c2855e1
...
@@ -12,80 +12,34 @@
...
@@ -12,80 +12,34 @@
// Useful for storing debug data in case of error/warning happens.
// Useful for storing debug data in case of error/warning happens.
namespace
spdlog
{
namespace
spdlog
{
namespace
details
{
namespace
details
{
class
backtracer
class
backtracer
{
{
mutable
std
::
mutex
mutex_
;
mutable
std
::
mutex
mutex_
;
std
::
atomic
<
bool
>
enabled_
{
false
};
std
::
atomic
<
bool
>
enabled_
{
false
};
circular_q
<
log_msg_buffer
>
messages_
;
circular_q
<
log_msg_buffer
>
messages_
;
public:
public:
backtracer
()
=
default
;
backtracer
()
=
default
;
backtracer
(
const
backtracer
&
other
)
backtracer
(
const
backtracer
&
other
);
{
std
::
lock_guard
<
std
::
mutex
>
lock
(
other
.
mutex_
);
enabled_
=
other
.
enabled
();
messages_
=
other
.
messages_
;
}
backtracer
(
backtracer
&&
other
)
SPDLOG_NOEXCEPT
{
std
::
lock_guard
<
std
::
mutex
>
lock
(
other
.
mutex_
);
enabled_
=
other
.
enabled
();
messages_
=
std
::
move
(
other
.
messages_
);
}
backtracer
&
operator
=
(
backtracer
other
)
backtracer
(
backtracer
&&
other
)
SPDLOG_NOEXCEPT
;
{
backtracer
&
operator
=
(
backtracer
other
);
std
::
lock_guard
<
std
::
mutex
>
lock
(
mutex_
);
void
enable
(
size_t
size
);
enabled_
=
other
.
enabled
();
void
disable
();
messages_
=
other
.
messages_
;
bool
enabled
()
const
;
return
*
this
;
explicit
operator
bool
()
const
;
}
void
push_back
(
const
log_msg
&
msg
);
void
enable
(
size_t
size
)
// pop all items in the q and apply the given fun on each of them.
{
void
foreach_pop
(
std
::
function
<
void
(
const
details
::
log_msg
&
)
>
fun
);
std
::
lock_guard
<
std
::
mutex
>
lock
{
mutex_
};
enabled_
.
store
(
true
,
std
::
memory_order_relaxed
);
messages_
=
circular_q
<
log_msg_buffer
>
{
size
};
}
};
void
disable
()
}
// namespace details
{
}
// namespace spdlog
std
::
lock_guard
<
std
::
mutex
>
lock
{
mutex_
};
enabled_
.
store
(
false
,
std
::
memory_order_relaxed
);
}
#ifdef SPDLOG_HEADER_ONLY
bool
enabled
()
const
#include "backtracer-inl.h"
{
#endif
return
enabled_
.
load
(
std
::
memory_order_relaxed
);
\ No newline at end of file
}
explicit
operator
bool
()
const
{
return
enabled
();
}
void
push_back
(
const
log_msg
&
msg
)
{
std
::
lock_guard
<
std
::
mutex
>
lock
{
mutex_
};
messages_
.
push_back
(
log_msg_buffer
{
msg
});
}
// pop all items in the q and apply the given fun on each of them.
void
foreach_pop
(
std
::
function
<
void
(
const
details
::
log_msg
&
)
>
fun
)
{
std
::
lock_guard
<
std
::
mutex
>
lock
{
mutex_
};
while
(
!
messages_
.
empty
())
{
log_msg_buffer
popped
;
messages_
.
pop_front
(
popped
);
fun
(
popped
);
}
}
};
}
// namespace details
}
// namespace spdlog
\ No newline at end of file
include/spdlog/details/circular_q.h
View file @
5c2855e1
...
@@ -7,100 +7,95 @@
...
@@ -7,100 +7,95 @@
#include <vector>
#include <vector>
namespace
spdlog
{
namespace
spdlog
{
namespace
details
{
namespace
details
{
template
<
typename
T
>
template
<
typename
T
>
class
circular_q
class
circular_q
{
size_t
max_items_
=
0
;
typename
std
::
vector
<
T
>::
size_type
head_
=
0
;
typename
std
::
vector
<
T
>::
size_type
tail_
=
0
;
size_t
overrun_counter_
=
0
;
std
::
vector
<
T
>
v_
;
public:
using
item_type
=
T
;
// empty cir
circular_q
()
=
default
;
explicit
circular_q
(
size_t
max_items
)
:
max_items_
(
max_items
+
1
)
// one item is reserved as marker for full q
,
v_
(
max_items_
)
{}
circular_q
(
const
circular_q
&
)
=
default
;
circular_q
&
operator
=
(
const
circular_q
&
)
=
default
;
// move cannot be default,
// since we need to reset head_, tail_, etc to zero in the moved object
circular_q
(
circular_q
&&
other
)
SPDLOG_NOEXCEPT
{
copy_moveable
(
std
::
move
(
other
));
}
circular_q
&
operator
=
(
circular_q
&&
other
)
SPDLOG_NOEXCEPT
{
copy_moveable
(
std
::
move
(
other
));
return
*
this
;
}
// push back, overrun (oldest) item if no room left
void
push_back
(
T
&&
item
)
{
if
(
max_items_
>
0
)
{
{
size_t
max_items_
=
0
;
v_
[
tail_
]
=
std
::
move
(
item
);
typename
std
::
vector
<
T
>::
size_type
head_
=
0
;
tail_
=
(
tail_
+
1
)
%
max_items_
;
typename
std
::
vector
<
T
>::
size_type
tail_
=
0
;
size_t
overrun_counter_
=
0
;
std
::
vector
<
T
>
v_
;
public:
if
(
tail_
==
head_
)
// overrun last item if full
using
item_type
=
T
;
// empty cir
circular_q
()
=
default
;
explicit
circular_q
(
size_t
max_items
)
:
max_items_
(
max_items
+
1
)
// one item is reserved as marker for full q
,
v_
(
max_items_
)
{}
circular_q
(
const
circular_q
&
)
=
default
;
circular_q
&
operator
=
(
const
circular_q
&
)
=
default
;
// move cannot be default,
// since we need to reset head_, tail_, etc to zero in the moved object
circular_q
(
circular_q
&&
other
)
SPDLOG_NOEXCEPT
{
copy_moveable
(
std
::
move
(
other
));
}
circular_q
&
operator
=
(
circular_q
&&
other
)
SPDLOG_NOEXCEPT
{
copy_moveable
(
std
::
move
(
other
));
return
*
this
;
}
// push back, overrun (oldest) item if no room left
void
push_back
(
T
&&
item
)
{
if
(
max_items_
>
0
)
{
v_
[
tail_
]
=
std
::
move
(
item
);
tail_
=
(
tail_
+
1
)
%
max_items_
;
if
(
tail_
==
head_
)
// overrun last item if full
{
head_
=
(
head_
+
1
)
%
max_items_
;
++
overrun_counter_
;
}
}
}
// Pop item from front.
// If there are no elements in the container, the behavior is undefined.
void
pop_front
(
T
&
popped_item
)
{
{
if
(
max_items_
>
0
)
head_
=
(
head_
+
1
)
%
max_items_
;
{
++
overrun_counter_
;
popped_item
=
std
::
move
(
v_
[
head_
]);
head_
=
(
head_
+
1
)
%
max_items_
;
}
}
}
}
bool
empty
()
}
{
return
tail_
==
head_
;
// Pop item from front.
}
// If there are no elements in the container, the behavior is undefined.
void
pop_front
(
T
&
popped_item
)
bool
full
()
{
{
if
(
max_items_
>
0
)
// head is ahead of the tail by 1
{
return
((
tail_
+
1
)
%
max_items_
)
==
head_
;
popped_item
=
std
::
move
(
v_
[
head_
]);
}
head_
=
(
head_
+
1
)
%
max_items_
;
}
size_t
overrun_counter
()
const
}
{
return
overrun_counter_
;
bool
empty
()
}
{
return
tail_
==
head_
;
private:
}
void
copy_moveable
(
circular_q
&&
other
)
SPDLOG_NOEXCEPT
{
bool
full
()
max_items_
=
other
.
max_items_
;
{
head_
=
other
.
head_
;
// head is ahead of the tail by 1
tail_
=
other
.
tail_
;
return
((
tail_
+
1
)
%
max_items_
)
==
head_
;
overrun_counter_
=
other
.
overrun_counter_
,
}
v_
=
std
::
move
(
other
.
v_
);
other
.
max_items_
=
0
;
// disable other
size_t
overrun_counter
()
const
}
{
return
overrun_counter_
;
};
}
}
// namespace details
private:
void
copy_moveable
(
circular_q
&&
other
)
SPDLOG_NOEXCEPT
{
max_items_
=
other
.
max_items_
;
head_
=
other
.
head_
;
tail_
=
other
.
tail_
;
overrun_counter_
=
other
.
overrun_counter_
,
v_
=
std
::
move
(
other
.
v_
);
other
.
max_items_
=
0
;
// disable other
}
};
}
// namespace details
}
// namespace spdlog
}
// namespace spdlog
include/spdlog/logger-inl.h
View file @
5c2855e1
...
@@ -23,8 +23,7 @@ SPDLOG_INLINE logger::logger(const logger &other)
...
@@ -23,8 +23,7 @@ SPDLOG_INLINE logger::logger(const logger &other)
,
flush_level_
(
other
.
flush_level_
.
load
(
std
::
memory_order_relaxed
))
,
flush_level_
(
other
.
flush_level_
.
load
(
std
::
memory_order_relaxed
))
,
custom_err_handler_
(
other
.
custom_err_handler_
)
,
custom_err_handler_
(
other
.
custom_err_handler_
)
,
tracer_
(
other
.
tracer_
)
,
tracer_
(
other
.
tracer_
)
{
{}
}
SPDLOG_INLINE
logger
::
logger
(
logger
&&
other
)
SPDLOG_NOEXCEPT
:
name_
(
std
::
move
(
other
.
name_
)),
SPDLOG_INLINE
logger
::
logger
(
logger
&&
other
)
SPDLOG_NOEXCEPT
:
name_
(
std
::
move
(
other
.
name_
)),
sinks_
(
std
::
move
(
other
.
sinks_
)),
sinks_
(
std
::
move
(
other
.
sinks_
)),
...
@@ -57,7 +56,7 @@ SPDLOG_INLINE void logger::swap(spdlog::logger &other) SPDLOG_NOEXCEPT
...
@@ -57,7 +56,7 @@ SPDLOG_INLINE void logger::swap(spdlog::logger &other) SPDLOG_NOEXCEPT
other
.
flush_level_
.
store
(
tmp
);
other
.
flush_level_
.
store
(
tmp
);
custom_err_handler_
.
swap
(
other
.
custom_err_handler_
);
custom_err_handler_
.
swap
(
other
.
custom_err_handler_
);
std
::
swap
(
tracer_
,
other
.
tracer_
);
std
::
swap
(
tracer_
,
other
.
tracer_
);
}
}
SPDLOG_INLINE
void
swap
(
logger
&
a
,
logger
&
b
)
SPDLOG_INLINE
void
swap
(
logger
&
a
,
logger
&
b
)
...
...
include/spdlog/sinks/daily_file_sink.h
View file @
5c2855e1
...
@@ -30,8 +30,8 @@ struct daily_filename_calculator
...
@@ -30,8 +30,8 @@ struct daily_filename_calculator
{
{
filename_t
basename
,
ext
;
filename_t
basename
,
ext
;
std
::
tie
(
basename
,
ext
)
=
details
::
file_helper
::
split_by_extension
(
filename
);
std
::
tie
(
basename
,
ext
)
=
details
::
file_helper
::
split_by_extension
(
filename
);
return
fmt
::
format
(
SPDLOG_FILENAME_T
(
"{}_{:04d}-{:02d}-{:02d}{}"
),
return
fmt
::
format
(
basename
,
now_tm
.
tm_year
+
1900
,
now_tm
.
tm_mon
+
1
,
now_tm
.
tm_mday
,
ext
);
SPDLOG_FILENAME_T
(
"{}_{:04d}-{:02d}-{:02d}{}"
),
basename
,
now_tm
.
tm_year
+
1900
,
now_tm
.
tm_mon
+
1
,
now_tm
.
tm_mday
,
ext
);
}
}
};
};
...
...
include/spdlog/sinks/rotating_file_sink-inl.h
View file @
5c2855e1
...
@@ -43,12 +43,12 @@ SPDLOG_INLINE rotating_file_sink<Mutex>::rotating_file_sink(
...
@@ -43,12 +43,12 @@ SPDLOG_INLINE rotating_file_sink<Mutex>::rotating_file_sink(
template
<
typename
Mutex
>
template
<
typename
Mutex
>
SPDLOG_INLINE
filename_t
rotating_file_sink
<
Mutex
>::
calc_filename
(
const
filename_t
&
filename
,
std
::
size_t
index
)
SPDLOG_INLINE
filename_t
rotating_file_sink
<
Mutex
>::
calc_filename
(
const
filename_t
&
filename
,
std
::
size_t
index
)
{
{
if
(
index
==
0u
)
if
(
index
==
0u
)
{
{
return
filename
;
return
filename
;
}
}
filename_t
basename
,
ext
;
filename_t
basename
,
ext
;
std
::
tie
(
basename
,
ext
)
=
details
::
file_helper
::
split_by_extension
(
filename
);
std
::
tie
(
basename
,
ext
)
=
details
::
file_helper
::
split_by_extension
(
filename
);
return
fmt
::
format
(
SPDLOG_FILENAME_T
(
"{}.{}{}"
),
basename
,
index
,
ext
);
return
fmt
::
format
(
SPDLOG_FILENAME_T
(
"{}.{}{}"
),
basename
,
index
,
ext
);
}
}
...
...
src/spdlog.cpp
View file @
5c2855e1
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
#include "spdlog/spdlog-inl.h"
#include "spdlog/spdlog-inl.h"
#include "spdlog/common-inl.h"
#include "spdlog/common-inl.h"
#include "spdlog/details/backtracer-inl.h"
#include "spdlog/logger-inl.h"
#include "spdlog/logger-inl.h"
template
spdlog
::
logger
::
logger
(
std
::
string
name
,
sinks_init_list
::
iterator
begin
,
sinks_init_list
::
iterator
end
);
template
spdlog
::
logger
::
logger
(
std
::
string
name
,
sinks_init_list
::
iterator
begin
,
sinks_init_list
::
iterator
end
);
...
...
tests/test_misc.cpp
View file @
5c2855e1
...
@@ -2,7 +2,6 @@
...
@@ -2,7 +2,6 @@
#include "test_sink.h"
#include "test_sink.h"
#include "spdlog/fmt/bin_to_hex.h"
#include "spdlog/fmt/bin_to_hex.h"
template
<
class
T
>
template
<
class
T
>
std
::
string
log_info
(
const
T
&
what
,
spdlog
::
level
::
level_enum
logger_level
=
spdlog
::
level
::
info
)
std
::
string
log_info
(
const
T
&
what
,
spdlog
::
level
::
level_enum
logger_level
=
spdlog
::
level
::
info
)
{
{
...
@@ -109,7 +108,7 @@ TEST_CASE("clone-logger", "[clone]")
...
@@ -109,7 +108,7 @@ TEST_CASE("clone-logger", "[clone]")
logger
->
info
(
"Some message 1"
);
logger
->
info
(
"Some message 1"
);
cloned
->
info
(
"Some message 2"
);
cloned
->
info
(
"Some message 2"
);
REQUIRE
(
test_sink
->
lines
().
size
()
==
2
);
REQUIRE
(
test_sink
->
lines
().
size
()
==
2
);
REQUIRE
(
test_sink
->
lines
()[
0
]
==
"Some message 1"
);
REQUIRE
(
test_sink
->
lines
()[
0
]
==
"Some message 1"
);
REQUIRE
(
test_sink
->
lines
()[
1
]
==
"Some message 2"
);
REQUIRE
(
test_sink
->
lines
()[
1
]
==
"Some message 2"
);
...
@@ -121,7 +120,7 @@ TEST_CASE("clone async", "[clone]")
...
@@ -121,7 +120,7 @@ TEST_CASE("clone async", "[clone]")
using
namespace
spdlog
;
using
namespace
spdlog
;
spdlog
::
init_thread_pool
(
4
,
1
);
spdlog
::
init_thread_pool
(
4
,
1
);
auto
test_sink
=
std
::
make_shared
<
sinks
::
test_sink_st
>
();
auto
test_sink
=
std
::
make_shared
<
sinks
::
test_sink_st
>
();
auto
logger
=
std
::
make_shared
<
spdlog
::
async_logger
>
(
"orig"
,
test_sink
,
spdlog
::
thread_pool
());
auto
logger
=
std
::
make_shared
<
spdlog
::
async_logger
>
(
"orig"
,
test_sink
,
spdlog
::
thread_pool
());
logger
->
set_pattern
(
"%v"
);
logger
->
set_pattern
(
"%v"
);
auto
cloned
=
logger
->
clone
(
"clone"
);
auto
cloned
=
logger
->
clone
(
"clone"
);
...
@@ -136,7 +135,7 @@ TEST_CASE("clone async", "[clone]")
...
@@ -136,7 +135,7 @@ TEST_CASE("clone async", "[clone]")
spdlog
::
details
::
os
::
sleep_for_millis
(
10
);
spdlog
::
details
::
os
::
sleep_for_millis
(
10
);
REQUIRE
(
test_sink
->
lines
().
size
()
==
2
);
REQUIRE
(
test_sink
->
lines
().
size
()
==
2
);
REQUIRE
(
test_sink
->
lines
()[
0
]
==
"Some message 1"
);
REQUIRE
(
test_sink
->
lines
()[
0
]
==
"Some message 1"
);
REQUIRE
(
test_sink
->
lines
()[
1
]
==
"Some message 2"
);
REQUIRE
(
test_sink
->
lines
()[
1
]
==
"Some message 2"
);
...
...
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