Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Guilhem Saurel
hpp-util
Commits
d181f80a
Commit
d181f80a
authored
Mar 15, 2019
by
Guilhem Saurel
Browse files
Merge tag 'v4.4.0'
Release of version 4.4.0.
parents
7337c276
c7537f36
Pipeline
#4022
passed with stage
in 1 minute and 52 seconds
Changes
4
Pipelines
4
Hide whitespace changes
Inline
Side-by-side
src/debug.cc
View file @
d181f80a
...
...
@@ -189,6 +189,7 @@ namespace hpp
{
writePrefix
(
std
::
cerr
,
channel
,
file
,
line
,
function
);
std
::
cerr
<<
incindent
<<
data
.
rdbuf
()
<<
decindent
<<
std
::
flush
;
data
.
rdbuf
()
->
pubseekpos
(
0
);
}
namespace
...
...
@@ -273,6 +274,7 @@ namespace hpp
writePrefix
(
stream
,
channel
,
file
,
line
,
function
);
stream
<<
incindent
<<
data
.
rdbuf
()
<<
decindent
<<
std
::
flush
;
data
.
rdbuf
()
->
pubseekpos
(
0
);
}
Logging
::
Logging
()
...
...
tests/CMakeLists.txt
View file @
d181f80a
...
...
@@ -29,7 +29,7 @@ MACRO(DEFINE_TEST NAME LIB)
# Link against Boost.
TARGET_LINK_LIBRARIES
(
${
NAME
}
${
Boost_LIBRARIES
}
)
ADD_TEST
(
${
NAME
}
${
RUNTIME_OUTPUT_DIRECTORY
}
/
${
NAME
}
)
ADD_TEST
(
NAME
${
NAME
}
COMMAND
${
RUNTIME_OUTPUT_DIRECTORY
}
/
${
NAME
}
)
ENDMACRO
(
DEFINE_TEST
)
...
...
@@ -39,3 +39,9 @@ DEFINE_TEST(assertion hpp-util)
DEFINE_TEST
(
exception hpp-util
)
DEFINE_TEST
(
exception-factory hpp-util
)
DEFINE_TEST
(
timer hpp-util
)
SET
(
HPP_LOGGINGDIR
"
${
CMAKE_CURRENT_BINARY_DIR
}
"
)
CONFIG_FILES
(
run_debug.sh
)
ADD_EXECUTABLE
(
debug debug.cc
)
TARGET_LINK_LIBRARIES
(
debug hpp-util
${
Boost_LIBRARIES
}
)
ADD_TEST
(
NAME debug COMMAND
${
RUNTIME_OUTPUT_DIRECTORY
}
/run_debug.sh
)
tests/debug.cc
View file @
d181f80a
...
...
@@ -26,12 +26,13 @@ using namespace hpp::debug;
int
run_test
()
{
ConsoleOutput
console
;
JournalOutput
out
(
"debug.test.log"
);
Channel
channel
(
"TEST"
,
boost
::
assign
::
list_of
<
Output
*>
(
&
out
));
for
(
int
i
=
0
;
i
<
100
000
;
++
i
)
{
Channel
channel
(
"TEST"
,
boost
::
assign
::
list_of
<
Output
*>
(
&
out
)
(
&
console
)
);
for
(
int
i
=
0
;
i
<
100
;
++
i
)
{
std
::
stringstream
ss
;
ss
<<
i
<<
hpp
::
iendl
;
out
.
write
(
channel
,
__FILE__
,
__LINE__
,
__PRETTY_FUNCTION__
,
ss
.
str
()
);
channel
.
write
(
__FILE__
,
__LINE__
,
__PRETTY_FUNCTION__
,
ss
);
}
return
0
;
}
...
...
tests/run_debug.sh.in
0 → 100755
View file @
d181f80a
#!/bin/bash
export
HPP_LOGGINGDIR
=
@HPP_LOGGINGDIR@
@CMAKE_BINARY_DIR@/tests/debug
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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