Commit 2b9fbe1a authored by Dominik Charousset's avatar Dominik Charousset

Fix unit test checks

parent 8fa01471
...@@ -33,7 +33,6 @@ using dummy_actor = stateful_actor<dummy_state>; ...@@ -33,7 +33,6 @@ using dummy_actor = stateful_actor<dummy_state>;
struct fixture : test_coordinator_fixture<> { struct fixture : test_coordinator_fixture<> {
actor dummy; actor dummy;
actor aut;
fixture() { fixture() {
dummy = sys.spawn<dummy_actor>(); dummy = sys.spawn<dummy_actor>();
...@@ -56,6 +55,7 @@ SCENARIO("response handles are convertible to observables and singles") { ...@@ -56,6 +55,7 @@ SCENARIO("response handles are convertible to observables and singles") {
.as_single<int32_t>() .as_single<int32_t>()
.subscribe([&result](int32_t val) { result = val; }, .subscribe([&result](int32_t val) { result = val; },
[&result](const error& what) { result = what; }); [&result](const error& what) { result = what; });
auto aut = actor{self};
launch(); launch();
expect((int32_t), from(aut).to(dummy).with(42)); expect((int32_t), from(aut).to(dummy).with(42));
expect((int32_t), from(dummy).to(aut).with(84)); expect((int32_t), from(dummy).to(aut).with(84));
...@@ -79,6 +79,7 @@ SCENARIO("response handles are convertible to observables and singles") { ...@@ -79,6 +79,7 @@ SCENARIO("response handles are convertible to observables and singles") {
}, },
[&](const error& what) { result = what; }, [&](const error& what) { result = what; },
[&] { completed = true; }); [&] { completed = true; });
auto aut = actor{self};
launch(); launch();
expect((int32_t), from(aut).to(dummy).with(42)); expect((int32_t), from(aut).to(dummy).with(42));
expect((int32_t), from(dummy).to(aut).with(84)); expect((int32_t), from(dummy).to(aut).with(84));
...@@ -99,6 +100,7 @@ SCENARIO("response handles are convertible to observables and singles") { ...@@ -99,6 +100,7 @@ SCENARIO("response handles are convertible to observables and singles") {
.as_single<int32_t>() .as_single<int32_t>()
.subscribe([&result](int32_t val) { result = val; }, .subscribe([&result](int32_t val) { result = val; },
[&result](const error& what) { result = what; }); [&result](const error& what) { result = what; });
auto aut = actor{self};
launch(); launch();
expect((int32_t), from(aut).to(dummy).with(13)); expect((int32_t), from(aut).to(dummy).with(13));
expect((error), from(dummy).to(aut)); expect((error), from(dummy).to(aut));
...@@ -122,6 +124,7 @@ SCENARIO("response handles are convertible to observables and singles") { ...@@ -122,6 +124,7 @@ SCENARIO("response handles are convertible to observables and singles") {
}, },
[&](const error& what) { result = what; }, [&](const error& what) { result = what; },
[&] { completed = true; }); [&] { completed = true; });
auto aut = actor{self};
launch(); launch();
expect((int32_t), from(aut).to(dummy).with(13)); expect((int32_t), from(aut).to(dummy).with(13));
expect((error), from(dummy).to(aut)); expect((error), from(dummy).to(aut));
......
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