Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
Actor Framework
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
Operations
Operations
Metrics
Environments
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
cpp-libs
Actor Framework
Commits
71fde408
Commit
71fde408
authored
Feb 12, 2016
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Print line in CAF_MESSAGE & bad tests in summary
parent
4fdd363c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
7 deletions
+17
-7
libcaf_test/caf/test/unit_test.hpp
libcaf_test/caf/test/unit_test.hpp
+2
-1
libcaf_test/caf/test/unit_test_impl.hpp
libcaf_test/caf/test/unit_test_impl.hpp
+15
-6
No files found.
libcaf_test/caf/test/unit_test.hpp
View file @
71fde408
...
...
@@ -419,7 +419,8 @@ using caf_test_case_auto_fixture = caf::test::dummy_fixture;
#define CAF_TEST_PRINT(level, msg, colorcode) \
(::caf::test::logger::instance(). level () \
<< ::caf::test::engine::color(::caf::test:: colorcode ) \
<< " -> " << ::caf::test::engine::color(::caf::test::reset) << msg << '\n')
<< " -> " << ::caf::test::engine::color(::caf::test::reset) << msg \
<< " [line " << __LINE__ << "]\n")
#define CAF_TEST_PRINT_ERROR(msg) CAF_TEST_PRINT(info, msg, red)
#define CAF_TEST_PRINT_INFO(msg) CAF_TEST_PRINT(info, msg, yellow)
...
...
libcaf_test/caf/test/unit_test_impl.hpp
View file @
71fde408
...
...
@@ -374,18 +374,17 @@ bool engine::run(bool colorize,
&&
!
std
::
regex_search
(
x
,
blacklist
);
};
# endif
std
::
vector
<
std
::
string
>
failed_tests
;
for
(
auto
&
p
:
instance
().
suites_
)
{
if
(
!
enabled
(
suites
,
not_suites
,
p
.
first
))
{
if
(
!
enabled
(
suites
,
not_suites
,
p
.
first
))
continue
;
}
auto
suite_name
=
p
.
first
.
empty
()
?
"<unnamed>"
:
p
.
first
;
auto
pad
=
std
::
string
((
bar
.
size
()
-
suite_name
.
size
())
/
2
,
' '
);
bool
displayed_header
=
false
;
size_t
tests_ran
=
0
;
for
(
auto
&
t
:
p
.
second
)
{
if
(
!
enabled
(
tests
,
not_tests
,
t
->
name
()))
{
if
(
!
enabled
(
tests
,
not_tests
,
t
->
name
()))
continue
;
}
instance
().
current_test_
=
t
.
get
();
++
tests_ran
;
if
(
!
displayed_header
)
{
...
...
@@ -425,6 +424,10 @@ bool engine::run(bool colorize,
<<
"took "
<<
color
(
cyan
)
<<
render
(
elapsed
)
<<
color
(
reset
)
<<
'\n'
;
if
(
bad
>
0
)
{
// concat suite name + test name
failed_tests
.
emplace_back
(
p
.
first
);
failed_tests
.
back
()
+=
":"
;
failed_tests
.
back
()
+=
t
->
name
();
log
.
verbose
()
<<
" ("
<<
color
(
green
)
<<
good
<<
color
(
reset
)
<<
'/'
<<
color
(
red
)
<<
bad
<<
color
(
reset
)
<<
")"
<<
'\n'
;
}
else
{
...
...
@@ -474,8 +477,14 @@ bool engine::run(bool colorize,
<<
render
(
runtime
)
<<
'\n'
<<
color
(
reset
)
<<
indent
<<
"success: "
<<
(
total_bad
==
total_bad_expected
?
color
(
green
)
:
color
(
red
))
<<
percent_good
<<
"%"
<<
color
(
reset
)
<<
"
\n\n
"
<<
color
(
cyan
)
<<
bar
<<
color
(
reset
)
<<
'\n'
;
<<
percent_good
<<
"%"
<<
color
(
reset
)
<<
"
\n\n
"
;
if
(
!
failed_tests
.
empty
())
{
log
.
info
()
<<
indent
<<
"failed tests:"
<<
'\n'
;
for
(
auto
&
name
:
failed_tests
)
log
.
info
()
<<
indent
<<
"- "
<<
name
<<
'\n'
;
log
.
info
()
<<
'\n'
;
}
log
.
info
()
<<
color
(
cyan
)
<<
bar
<<
color
(
reset
)
<<
'\n'
;
return
total_bad
==
total_bad_expected
;
}
...
...
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