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
95b45696
Unverified
Commit
95b45696
authored
Jul 28, 2023
by
Dominik Charousset
Committed by
GitHub
Jul 28, 2023
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1510
Return the result from check functions
parents
7b96836a
16dba433
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
6 deletions
+8
-6
libcaf_test/caf/test/runnable.cpp
libcaf_test/caf/test/runnable.cpp
+4
-3
libcaf_test/caf/test/runnable.hpp
libcaf_test/caf/test/runnable.hpp
+4
-3
No files found.
libcaf_test/caf/test/runnable.cpp
View file @
95b45696
...
...
@@ -39,12 +39,13 @@ void runnable::run() {
}
}
void
runnable
::
check
(
bool
value
,
const
detail
::
source_location
&
location
)
{
bool
runnable
::
check
(
bool
value
,
const
detail
::
source_location
&
location
)
{
if
(
value
)
{
reporter
::
instance
->
pass
(
location
);
return
;
}
}
else
{
reporter
::
instance
->
fail
(
"should be true"
,
location
);
}
return
value
;
}
block
&
runnable
::
current_block
()
{
...
...
libcaf_test/caf/test/runnable.hpp
View file @
95b45696
...
...
@@ -55,7 +55,7 @@ public:
/// Checks whether `lhs` and `rhs` are equal.
template
<
class
T0
,
class
T1
>
void
check_eq
(
const
T0
&
lhs
,
const
T1
&
rhs
,
bool
check_eq
(
const
T0
&
lhs
,
const
T1
&
rhs
,
const
detail
::
source_location
&
location
=
detail
::
source_location
::
current
())
{
if
(
std
::
is_integral_v
<
T0
>
&&
std
::
is_integral_v
<
T1
>
)
{
...
...
@@ -64,13 +64,14 @@ public:
}
if
(
lhs
==
rhs
)
{
reporter
::
instance
->
pass
(
location
);
return
;
return
true
;
}
reporter
::
instance
->
fail
(
binary_predicate
::
eq
,
stringify
(
lhs
),
stringify
(
rhs
),
location
);
return
false
;
}
void
check
(
bool
value
,
const
detail
::
source_location
&
location
bool
check
(
bool
value
,
const
detail
::
source_location
&
location
=
detail
::
source_location
::
current
());
block
&
current_block
();
...
...
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