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
df71dafe
Commit
df71dafe
authored
Apr 25, 2015
by
Marian Triebe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove `shutdown` call from unit test framework
If necessary every unit test should call `shutdown` for itself.
parent
d6f37fd4
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
27 additions
and
27 deletions
+27
-27
libcaf_core/test/atom.cpp
libcaf_core/test/atom.cpp
+12
-7
libcaf_core/test/custom_exception_handler.cpp
libcaf_core/test/custom_exception_handler.cpp
+1
-0
libcaf_core/test/extract.cpp
libcaf_core/test/extract.cpp
+4
-1
libcaf_core/test/fixed_stack_actor.cpp
libcaf_core/test/fixed_stack_actor.cpp
+2
-1
libcaf_core/test/fixed_vector.cpp
libcaf_core/test/fixed_vector.cpp
+0
-2
libcaf_core/test/intrusive_ptr.cpp
libcaf_core/test/intrusive_ptr.cpp
+0
-2
libcaf_core/test/match.cpp
libcaf_core/test/match.cpp
+5
-1
libcaf_core/test/message.cpp
libcaf_core/test/message.cpp
+2
-2
libcaf_core/test/optional.cpp
libcaf_core/test/optional.cpp
+0
-2
libcaf_core/test/or_else.cpp
libcaf_core/test/or_else.cpp
+1
-0
libcaf_core/test/ripemd_160.cpp
libcaf_core/test/ripemd_160.cpp
+0
-3
libcaf_test/caf/test/unit_test.hpp
libcaf_test/caf/test/unit_test.hpp
+0
-2
libcaf_test/caf/test/unit_test_impl.hpp
libcaf_test/caf/test/unit_test_impl.hpp
+0
-4
No files found.
libcaf_core/test/atom.cpp
View file @
df71dafe
...
...
@@ -23,6 +23,7 @@
#include <string>
#include "caf/all.hpp"
#include "caf/shutdown.hpp"
using
namespace
caf
;
...
...
@@ -118,11 +119,15 @@ testee::behavior_type testee_impl(testee::pointer self) {
}
CAF_TEST
(
sync_send_atom_constants
)
{
scoped_actor
self
;
auto
tst
=
spawn_typed
(
testee_impl
);
self
->
sync_send
(
tst
,
abc_atom
::
value
).
await
(
[](
int
i
)
{
CAF_CHECK_EQUAL
(
i
,
42
);
}
);
{
scoped_actor
self
;
auto
tst
=
spawn_typed
(
testee_impl
);
self
->
sync_send
(
tst
,
abc_atom
::
value
).
await
(
[](
int
i
)
{
CAF_CHECK_EQUAL
(
i
,
42
);
}
);
self
->
await_all_other_actors_done
();
}
shutdown
();
}
libcaf_core/test/custom_exception_handler.cpp
View file @
df71dafe
...
...
@@ -89,6 +89,7 @@ CAF_TEST(test_custom_exception_handler) {
}
}
);
self
->
await_all_other_actors_done
();
}
shutdown
();
}
libcaf_core/test/extract.cpp
View file @
df71dafe
...
...
@@ -23,7 +23,10 @@
#include <string>
#include <vector>
#include "caf/all.hpp"
#include "caf/on.hpp"
#include "caf/message.hpp"
#include "caf/message_builder.hpp"
#include "caf/message_handler.hpp"
using
namespace
caf
;
...
...
libcaf_core/test/fixed_stack_actor.cpp
View file @
df71dafe
...
...
@@ -120,5 +120,6 @@ CAF_TEST(test_fixed_stack_actor) {
self
->
send_exit
(
st
,
exit_reason
::
user_shutdown
);
self
->
await_all_other_actors_done
();
}
shutdown
();
await_all_actors_done
();
shutdown
();
}
libcaf_core/test/fixed_vector.cpp
View file @
df71dafe
...
...
@@ -22,7 +22,6 @@
#include <algorithm>
#include "caf/all.hpp"
#include "caf/detail/limited_vector.hpp"
using
std
::
cout
;
...
...
@@ -75,5 +74,4 @@ CAF_TEST(limited_vector) {
CAF_CHECK_EQUAL
(
vec7
.
size
(),
5
);
CAF_CHECK
((
std
::
all_of
(
vec7
.
begin
(),
vec7
.
end
(),
[](
int
i
)
{
return
i
==
0
;
})));
caf
::
shutdown
();
}
libcaf_core/test/intrusive_ptr.cpp
View file @
df71dafe
...
...
@@ -26,7 +26,6 @@
#include <list>
#include <cstddef>
#include "caf/shutdown.hpp"
#include "caf/ref_counted.hpp"
#include "caf/make_counted.hpp"
#include "caf/intrusive_ptr.hpp"
...
...
@@ -162,5 +161,4 @@ CAF_TEST(full_test) {
}
CAF_CHECK_EQUAL
(
class0_instances
,
0
);
CAF_CHECK_EQUAL
(
class1_instances
,
0
);
shutdown
();
}
libcaf_core/test/match.cpp
View file @
df71dafe
...
...
@@ -22,7 +22,11 @@
#include <functional>
#include "caf/all.hpp"
#include "caf/on.hpp"
#include "caf/announce.hpp"
#include "caf/shutdown.hpp"
#include "caf/message_builder.hpp"
#include "caf/message_handler.hpp"
using
namespace
caf
;
using
namespace
std
;
...
...
libcaf_core/test/message.cpp
View file @
df71dafe
...
...
@@ -20,7 +20,8 @@
#define CAF_SUITE message
#include "caf/test/unit_test.hpp"
#include "caf/all.hpp"
#include "caf/message.hpp"
#include "caf/message_builder.hpp"
using
std
::
cout
;
using
std
::
endl
;
...
...
@@ -123,5 +124,4 @@ CAF_TEST(test_concat) {
get_atom
::
value
,
uint32_t
{
1
});
CAF_CHECK_EQUAL
(
to_string
(
message
::
concat
(
m3
,
message
{},
m1
,
m2
)),
to_string
(
m4
));
shutdown
();
}
libcaf_core/test/optional.cpp
View file @
df71dafe
...
...
@@ -23,7 +23,6 @@
#include <string>
#include "caf/optional.hpp"
#include "caf/shutdown.hpp"
using
namespace
std
;
using
namespace
caf
;
...
...
@@ -70,5 +69,4 @@ CAF_TEST(test_optional) {
CAF_CHECK
(
!
j
.
empty
());
}
}
shutdown
();
}
libcaf_core/test/or_else.cpp
View file @
df71dafe
...
...
@@ -70,5 +70,6 @@ CAF_TEST(test_or_else) {
})
);
}
await_all_actors_done
();
shutdown
();
}
libcaf_core/test/ripemd_160.cpp
View file @
df71dafe
...
...
@@ -23,8 +23,6 @@
#include <iomanip>
#include <iostream>
#include "caf/shutdown.hpp"
#include "caf/detail/ripemd_160.hpp"
using
caf
::
detail
::
ripemd_160
;
...
...
@@ -63,5 +61,4 @@ CAF_TEST(test_ripemd_160) {
CAF_CHECK_EQUAL
(
"9b752e45573d4b39f4dbd3323cab82bf63326bfb"
,
str_hash
(
"1234567890123456789012345678901234567890"
"1234567890123456789012345678901234567890"
));
caf
::
shutdown
();
}
libcaf_test/caf/test/unit_test.hpp
View file @
df71dafe
...
...
@@ -32,8 +32,6 @@
#include <sstream>
#include <iostream>
#include "caf/actor.hpp"
namespace
caf
{
class
message
;
namespace
test
{
...
...
libcaf_test/caf/test/unit_test_impl.hpp
View file @
df71dafe
...
...
@@ -26,11 +26,9 @@
#include <algorithm>
#include <condition_variable>
#include "caf/shutdown.hpp"
#include "caf/message_builder.hpp"
#include "caf/message_handler.hpp"
#include "caf/string_algorithms.hpp"
#include "caf/await_all_actors_done.hpp"
namespace
caf
{
namespace
test
{
...
...
@@ -613,8 +611,6 @@ int main(int argc, char** argv) {
auto
result
=
test
::
engine
::
run
(
colorize
,
log_file
,
verbosity_console
,
verbosity_file
,
max_runtime
,
suites
,
not_suites
,
tests
,
not_tests
);
await_all_actors_done
();
shutdown
();
return
result
?
0
:
1
;
}
...
...
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