Commit ef2e2fb2 authored by Andris Mednis's avatar Andris Mednis

Fix typos in tests

parent 3ab68814
...@@ -184,7 +184,7 @@ struct fixture { ...@@ -184,7 +184,7 @@ struct fixture {
} // namespace } // namespace
CAF_TEST(destructor_call) { CAF_TEST(destructor_call) {
{ // lifetime scope of actor systme { // lifetime scope of actor system
actor_system_config cfg; actor_system_config cfg;
actor_system system{cfg}; actor_system system{cfg};
system.spawn<testee>(); system.spawn<testee>();
......
...@@ -57,7 +57,7 @@ struct handle_set { ...@@ -57,7 +57,7 @@ struct handle_set {
actor_addr wh; actor_addr wh;
// Dynamically typed handle to the actor. // Dynamically typed handle to the actor.
actor dt; actor dt;
// Staically typed handle to the actor. // Statically typed handle to the actor.
testee_actor st; testee_actor st;
handle_set() = default; handle_set() = default;
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
#define CAF_SUITE intrusive_ptr #define CAF_SUITE intrusive_ptr
#include "caf/test/unit_test.hpp" #include "caf/test/unit_test.hpp"
// this test dosn't verify thread-safety of intrusive_ptr // this test doesn't verify thread-safety of intrusive_ptr
// however, it is thread safe since it uses atomic operations only // however, it is thread safe since it uses atomic operations only
#include <vector> #include <vector>
......
...@@ -54,7 +54,7 @@ CAF_TEST(equality) { ...@@ -54,7 +54,7 @@ CAF_TEST(equality) {
CAF_CHECK_EQUAL(a, b); CAF_CHECK_EQUAL(a, b);
} }
CAF_TEST(constains) { CAF_TEST(contains) {
ipv4_subnet local{addr(127, 0, 0, 0), 8}; ipv4_subnet local{addr(127, 0, 0, 0), 8};
CAF_CHECK(local.contains(addr(127, 0, 0, 1))); CAF_CHECK(local.contains(addr(127, 0, 0, 1)));
CAF_CHECK(local.contains(addr(127, 1, 2, 3))); CAF_CHECK(local.contains(addr(127, 1, 2, 3)));
......
...@@ -49,7 +49,7 @@ CAF_TEST(equality) { ...@@ -49,7 +49,7 @@ CAF_TEST(equality) {
CAF_CHECK_EQUAL(a, b); CAF_CHECK_EQUAL(a, b);
} }
CAF_TEST(constains) { CAF_TEST(contains) {
auto local = ipv6_address{{0xbebe, 0xbebe}, {}} / 32; auto local = ipv6_address{{0xbebe, 0xbebe}, {}} / 32;
CAF_CHECK(local.contains(ipv6_address({0xbebe, 0xbebe, 0xbebe}, {}))); CAF_CHECK(local.contains(ipv6_address({0xbebe, 0xbebe, 0xbebe}, {})));
CAF_CHECK(!local.contains(ipv6_address({0xbebe, 0xbebf}, {}))); CAF_CHECK(!local.contains(ipv6_address({0xbebe, 0xbebf}, {})));
......
...@@ -53,7 +53,7 @@ void global_fun() { ...@@ -53,7 +53,7 @@ void global_fun() {
// Clang expands template parameters in __PRETTY_FUNCTION__, while GCC does // Clang expands template parameters in __PRETTY_FUNCTION__, while GCC does
// not. For example, Clang would produce "void foo<int>::bar()", while GCC // not. For example, Clang would produce "void foo<int>::bar()", while GCC
// would produce "void foo<T>::bar() [with T = int]". A type called T gives // would produce "void foo<T>::bar() [with T = int]". A type called T gives
// us always the same ouptut for the prefix. // us always the same output for the prefix.
struct T {}; struct T {};
namespace { namespace {
......
...@@ -203,7 +203,7 @@ CAF_TEST(getter and setter access) { ...@@ -203,7 +203,7 @@ CAF_TEST(getter and setter access) {
test_foo_field(foo_field); test_foo_field(foo_field);
} }
CAF_TEST(oject access from dictionary - foobar) { CAF_TEST(object access from dictionary - foobar) {
settings x; settings x;
put(x, "my-value.bar", "hello"); put(x, "my-value.bar", "hello");
CAF_MESSAGE("without foo member"); CAF_MESSAGE("without foo member");
...@@ -225,7 +225,7 @@ CAF_TEST(oject access from dictionary - foobar) { ...@@ -225,7 +225,7 @@ CAF_TEST(oject access from dictionary - foobar) {
} }
} }
CAF_TEST(oject access from dictionary - foobar_foobar) { CAF_TEST(object access from dictionary - foobar_foobar) {
settings x; settings x;
put(x, "my-value.x.foo", 1); put(x, "my-value.x.foo", 1);
put(x, "my-value.x.bar", "hello"); put(x, "my-value.x.bar", "hello");
......
...@@ -661,7 +661,7 @@ CAF_TEST(depth_3_pipeline_2000_items) { ...@@ -661,7 +661,7 @@ CAF_TEST(depth_3_pipeline_2000_items) {
loop(alice, bob); loop(alice, bob);
CAF_CHECK_NOT_EQUAL(bob.data.size(), 0u); CAF_CHECK_NOT_EQUAL(bob.data.size(), 0u);
CAF_CHECK_EQUAL(carl.data.size(), 0u); CAF_CHECK_EQUAL(carl.data.size(), 0u);
CAF_MESSAGE("loop over bob and carl until bob finsihed sending"); CAF_MESSAGE("loop over bob and carl until bob finished sending");
// bob has one batch from alice in its mailbox that bob will read when // bob has one batch from alice in its mailbox that bob will read when
// becoming uncongested again // becoming uncongested again
loop(bob, carl); loop(bob, carl);
......
...@@ -68,14 +68,14 @@ struct consumer { ...@@ -68,14 +68,14 @@ struct consumer {
intrusive::task_result operator()(const Key&, const Queue&, intrusive::task_result operator()(const Key&, const Queue&,
const mailbox_element& x) { const mailbox_element& x) {
if (!x.content().match_elements<int>()) if (!x.content().match_elements<int>())
CAF_FAIL("unexepected message: " << x.content()); CAF_FAIL("unexpected message: " << x.content());
ints.emplace_back(x.content().get_as<int>(0)); ints.emplace_back(x.content().get_as<int>(0));
return intrusive::task_result::resume; return intrusive::task_result::resume;
} }
template <class Key, class Queue, class... Ts> template <class Key, class Queue, class... Ts>
intrusive::task_result operator()(const Key&, const Queue&, const Ts&...) { intrusive::task_result operator()(const Key&, const Queue&, const Ts&...) {
CAF_FAIL("unexepected message type"); // << typeid(Ts).name()); CAF_FAIL("unexpected message type"); // << typeid(Ts).name());
return intrusive::task_result::resume; return intrusive::task_result::resume;
} }
}; };
......
...@@ -51,7 +51,7 @@ struct fixture { ...@@ -51,7 +51,7 @@ struct fixture {
CAF_TEST_FIXTURE_SCOPE(receive_buffer_tests, fixture) CAF_TEST_FIXTURE_SCOPE(receive_buffer_tests, fixture)
CAF_TEST(constuctors) { CAF_TEST(constructors) {
CAF_CHECK_EQUAL(a.size(), 0ul); CAF_CHECK_EQUAL(a.size(), 0ul);
CAF_CHECK_EQUAL(a.capacity(), 0ul); CAF_CHECK_EQUAL(a.capacity(), 0ul);
CAF_CHECK_EQUAL(a.data(), nullptr); CAF_CHECK_EQUAL(a.data(), nullptr);
......
...@@ -765,7 +765,7 @@ public: ...@@ -765,7 +765,7 @@ public:
/// Consume messages and trigger timeouts until no activity remains. /// Consume messages and trigger timeouts until no activity remains.
/// @returns The total number of events, i.e., messages consumed and /// @returns The total number of events, i.e., messages consumed and
/// timeouts triggerd. /// timeouts triggered.
size_t run() { size_t run() {
return run_until([] { return false; }); return run_until([] { return false; });
} }
......
...@@ -417,7 +417,7 @@ public: ...@@ -417,7 +417,7 @@ public:
/// @param not_suites_str Regular expression for excluding test suites. /// @param not_suites_str Regular expression for excluding test suites.
/// @param tests_str Regular expression for individually selecting tests. /// @param tests_str Regular expression for individually selecting tests.
/// @param not_tests_str Regular expression for individually disabling tests. /// @param not_tests_str Regular expression for individually disabling tests.
/// @returns `true` iff all tests succeeded. /// @returns `true` if all tests succeeded.
static bool run(bool colorize, static bool run(bool colorize,
const std::string& log_file, const std::string& log_file,
int verbosity_console, int verbosity_console,
......
...@@ -341,7 +341,7 @@ bool engine::run(bool colorize, ...@@ -341,7 +341,7 @@ bool engine::run(bool colorize,
auto test_enabled = [&](const whitelist_type& whitelist, auto test_enabled = [&](const whitelist_type& whitelist,
const blacklist_type& blacklist, const blacklist_type& blacklist,
const test& x) { const test& x) {
// Disabled tests run iff explicitly requested by the user, i.e., // Disabled tests run if explicitly requested by the user, i.e.,
// tests_str is not the ".*" catch-all default. // tests_str is not the ".*" catch-all default.
return (!x.disabled() || tests_str != ".*") return (!x.disabled() || tests_str != ".*")
&& enabled(whitelist, blacklist, x.name()); && enabled(whitelist, blacklist, x.name());
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment