summaryrefslogtreecommitdiff
path: root/Rx/v2/test
diff options
context:
space:
mode:
authorKirk Shoop <kirk.shoop@microsoft.com>2014-08-27 23:59:12 -0700
committerKirk Shoop <kirk.shoop@microsoft.com>2014-08-28 00:10:08 -0700
commit4b6b5491d28e14b2caca95516bd5c06fd8956d3c (patch)
tree5507c53e5c11ffa56492f62f648f68035c4cc308 /Rx/v2/test
parentebfff78d8e64f67e8e58717c7780bb2f8a8733d2 (diff)
downloadRxCpp-4b6b5491d28e14b2caca95516bd5c06fd8956d3c.tar.gz
update tests to use on.next instead of on.on_next
Diffstat (limited to 'Rx/v2/test')
-rw-r--r--Rx/v2/test/operators/buffer.cpp188
-rw-r--r--Rx/v2/test/operators/combine_latest.1.cpp160
-rw-r--r--Rx/v2/test/operators/combine_latest.2.cpp168
-rw-r--r--Rx/v2/test/operators/concat.cpp76
-rw-r--r--Rx/v2/test/operators/concat_map.cpp34
-rw-r--r--Rx/v2/test/operators/distinct_until_changed.cpp94
-rw-r--r--Rx/v2/test/operators/filter.cpp182
-rw-r--r--Rx/v2/test/operators/flat_map.cpp156
-rw-r--r--Rx/v2/test/operators/group_by.cpp48
-rw-r--r--Rx/v2/test/operators/lift.cpp90
-rw-r--r--Rx/v2/test/operators/map.cpp28
-rw-r--r--Rx/v2/test/operators/merge.cpp144
-rw-r--r--Rx/v2/test/operators/publish.cpp120
-rw-r--r--Rx/v2/test/operators/reduce.cpp32
-rw-r--r--Rx/v2/test/operators/repeat.cpp128
-rw-r--r--Rx/v2/test/operators/scan.cpp64
-rw-r--r--Rx/v2/test/operators/skip.cpp486
-rw-r--r--Rx/v2/test/operators/skip_until.cpp130
-rw-r--r--Rx/v2/test/operators/switch_on_next.cpp200
-rw-r--r--Rx/v2/test/operators/take.cpp520
-rw-r--r--Rx/v2/test/operators/take_until.cpp202
-rw-r--r--Rx/v2/test/operators/window.cpp174
-rw-r--r--Rx/v2/test/sources/create.cpp4
-rw-r--r--Rx/v2/test/sources/defer.cpp8
-rw-r--r--Rx/v2/test/sources/scope.cpp58
-rw-r--r--Rx/v2/test/subjects/subject.cpp110
26 files changed, 1802 insertions, 1802 deletions
diff --git a/Rx/v2/test/operators/buffer.cpp b/Rx/v2/test/operators/buffer.cpp
index f02d8fe..4a60877 100644
--- a/Rx/v2/test/operators/buffer.cpp
+++ b/Rx/v2/test/operators/buffer.cpp
@@ -14,12 +14,12 @@ SCENARIO("buffer count partial window", "[buffer][operators]"){
const rxsc::test::messages<std::vector<int>> v_on;
auto xs = sc.make_hot_observable({
- on.on_next(150, 1),
- on.on_next(210, 2),
- on.on_next(220, 3),
- on.on_next(230, 4),
- on.on_next(240, 5),
- on.on_completed(250)
+ on.next(150, 1),
+ on.next(210, 2),
+ on.next(220, 3),
+ on.next(230, 4),
+ on.next(240, 5),
+ on.completed(250)
});
WHEN("group each int with the next 4 ints"){
@@ -35,8 +35,8 @@ SCENARIO("buffer count partial window", "[buffer][operators]"){
THEN("the output contains groups of ints"){
auto required = rxu::to_vector({
- v_on.on_next(250, rxu::to_vector({ 2, 3, 4, 5 })),
- v_on.on_completed(250)
+ v_on.next(250, rxu::to_vector({ 2, 3, 4, 5 })),
+ v_on.completed(250)
});
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
@@ -61,12 +61,12 @@ SCENARIO("buffer count full windows", "[buffer][operators]"){
const rxsc::test::messages<std::vector<int>> v_on;
auto xs = sc.make_hot_observable({
- on.on_next(150, 1),
- on.on_next(210, 2),
- on.on_next(220, 3),
- on.on_next(230, 4),
- on.on_next(240, 5),
- on.on_completed(250)
+ on.next(150, 1),
+ on.next(210, 2),
+ on.next(220, 3),
+ on.next(230, 4),
+ on.next(240, 5),
+ on.completed(250)
});
WHEN("group each int with the next int"){
@@ -82,9 +82,9 @@ SCENARIO("buffer count full windows", "[buffer][operators]"){
THEN("the output contains groups of ints"){
auto required = rxu::to_vector({
- v_on.on_next(220, rxu::to_vector({ 2, 3 })),
- v_on.on_next(240, rxu::to_vector({ 4, 5 })),
- v_on.on_completed(250)
+ v_on.next(220, rxu::to_vector({ 2, 3 })),
+ v_on.next(240, rxu::to_vector({ 4, 5 })),
+ v_on.completed(250)
});
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
@@ -109,12 +109,12 @@ SCENARIO("buffer count full and partial windows", "[buffer][operators]"){
const rxsc::test::messages<std::vector<int>> v_on;
auto xs = sc.make_hot_observable({
- on.on_next(150, 1),
- on.on_next(210, 2),
- on.on_next(220, 3),
- on.on_next(230, 4),
- on.on_next(240, 5),
- on.on_completed(250)
+ on.next(150, 1),
+ on.next(210, 2),
+ on.next(220, 3),
+ on.next(230, 4),
+ on.next(240, 5),
+ on.completed(250)
});
WHEN("group each int with the next 2 ints"){
@@ -130,9 +130,9 @@ SCENARIO("buffer count full and partial windows", "[buffer][operators]"){
THEN("the output contains groups of ints"){
auto required = rxu::to_vector({
- v_on.on_next(230, rxu::to_vector({ 2, 3, 4 })),
- v_on.on_next(250, rxu::to_vector({ 5 })),
- v_on.on_completed(250)
+ v_on.next(230, rxu::to_vector({ 2, 3, 4 })),
+ v_on.next(250, rxu::to_vector({ 5 })),
+ v_on.completed(250)
});
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
@@ -159,12 +159,12 @@ SCENARIO("buffer count error", "[buffer][operators]"){
std::runtime_error ex("buffer on_error from source");
auto xs = sc.make_hot_observable({
- on.on_next(150, 1),
- on.on_next(210, 2),
- on.on_next(220, 3),
- on.on_next(230, 4),
- on.on_next(240, 5),
- on.on_error(250, ex)
+ on.next(150, 1),
+ on.next(210, 2),
+ on.next(220, 3),
+ on.next(230, 4),
+ on.next(240, 5),
+ on.error(250, ex)
});
WHEN("group each int with the next 4 ints"){
@@ -180,7 +180,7 @@ SCENARIO("buffer count error", "[buffer][operators]"){
THEN("the output contains groups of ints"){
auto required = rxu::to_vector({
- v_on.on_error(250, ex)
+ v_on.error(250, ex)
});
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
@@ -205,12 +205,12 @@ SCENARIO("buffer count skip less", "[buffer][operators]"){
const rxsc::test::messages<std::vector<int>> v_on;
auto xs = sc.make_hot_observable({
- on.on_next(150, 1),
- on.on_next(210, 2),
- on.on_next(220, 3),
- on.on_next(230, 4),
- on.on_next(240, 5),
- on.on_completed(250)
+ on.next(150, 1),
+ on.next(210, 2),
+ on.next(220, 3),
+ on.next(230, 4),
+ on.next(240, 5),
+ on.completed(250)
});
WHEN("group each int with the next 2 ints"){
@@ -226,11 +226,11 @@ SCENARIO("buffer count skip less", "[buffer][operators]"){
THEN("the output contains groups of ints"){
auto required = rxu::to_vector({
- v_on.on_next(230, rxu::to_vector({ 2, 3, 4 })),
- v_on.on_next(240, rxu::to_vector({ 3, 4, 5 })),
- v_on.on_next(250, rxu::to_vector({ 4, 5 })),
- v_on.on_next(250, rxu::to_vector({ 5 })),
- v_on.on_completed(250)
+ v_on.next(230, rxu::to_vector({ 2, 3, 4 })),
+ v_on.next(240, rxu::to_vector({ 3, 4, 5 })),
+ v_on.next(250, rxu::to_vector({ 4, 5 })),
+ v_on.next(250, rxu::to_vector({ 5 })),
+ v_on.completed(250)
});
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
@@ -255,12 +255,12 @@ SCENARIO("buffer count skip more", "[buffer][operators]"){
const rxsc::test::messages<std::vector<int>> v_on;
auto xs = sc.make_hot_observable({
- on.on_next(150, 1),
- on.on_next(210, 2),
- on.on_next(220, 3),
- on.on_next(230, 4),
- on.on_next(240, 5),
- on.on_completed(250)
+ on.next(150, 1),
+ on.next(210, 2),
+ on.next(220, 3),
+ on.next(230, 4),
+ on.next(240, 5),
+ on.completed(250)
});
WHEN("group each int with the next int skipping the third one"){
@@ -276,9 +276,9 @@ SCENARIO("buffer count skip more", "[buffer][operators]"){
THEN("the output contains groups of ints"){
auto required = rxu::to_vector({
- v_on.on_next(220, rxu::to_vector({ 2, 3 })),
- v_on.on_next(250, rxu::to_vector({ 5 })),
- v_on.on_completed(250)
+ v_on.next(220, rxu::to_vector({ 2, 3 })),
+ v_on.next(250, rxu::to_vector({ 5 })),
+ v_on.completed(250)
});
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
@@ -303,16 +303,16 @@ SCENARIO("buffer count basic", "[buffer][operators]"){
const rxsc::test::messages<std::vector<int>> v_on;
auto xs = sc.make_hot_observable({
- on.on_next(100, 1),
- on.on_next(210, 2),
- on.on_next(240, 3),
- on.on_next(280, 4),
- on.on_next(320, 5),
- on.on_next(350, 6),
- on.on_next(380, 7),
- on.on_next(420, 8),
- on.on_next(470, 9),
- on.on_completed(600)
+ on.next(100, 1),
+ on.next(210, 2),
+ on.next(240, 3),
+ on.next(280, 4),
+ on.next(320, 5),
+ on.next(350, 6),
+ on.next(380, 7),
+ on.next(420, 8),
+ on.next(470, 9),
+ on.completed(600)
});
WHEN("group each int with the next 2 ints"){
@@ -328,11 +328,11 @@ SCENARIO("buffer count basic", "[buffer][operators]"){
THEN("the output contains groups of ints"){
auto required = rxu::to_vector({
- v_on.on_next(280, rxu::to_vector({ 2, 3, 4 })),
- v_on.on_next(350, rxu::to_vector({ 4, 5, 6 })),
- v_on.on_next(420, rxu::to_vector({ 6, 7, 8 })),
- v_on.on_next(600, rxu::to_vector({ 8, 9 })),
- v_on.on_completed(600)
+ v_on.next(280, rxu::to_vector({ 2, 3, 4 })),
+ v_on.next(350, rxu::to_vector({ 4, 5, 6 })),
+ v_on.next(420, rxu::to_vector({ 6, 7, 8 })),
+ v_on.next(600, rxu::to_vector({ 8, 9 })),
+ v_on.completed(600)
});
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
@@ -357,16 +357,16 @@ SCENARIO("buffer count disposed", "[buffer][operators]"){
const rxsc::test::messages<std::vector<int>> v_on;
auto xs = sc.make_hot_observable({
- on.on_next(100, 1),
- on.on_next(210, 2),
- on.on_next(240, 3),
- on.on_next(280, 4),
- on.on_next(320, 5),
- on.on_next(350, 6),
- on.on_next(380, 7),
- on.on_next(420, 8),
- on.on_next(470, 9),
- on.on_completed(600)
+ on.next(100, 1),
+ on.next(210, 2),
+ on.next(240, 3),
+ on.next(280, 4),
+ on.next(320, 5),
+ on.next(350, 6),
+ on.next(380, 7),
+ on.next(420, 8),
+ on.next(470, 9),
+ on.completed(600)
});
WHEN("group each int with the next 2 ints"){
@@ -383,8 +383,8 @@ SCENARIO("buffer count disposed", "[buffer][operators]"){
THEN("the output contains groups of ints"){
auto required = rxu::to_vector({
- v_on.on_next(280, rxu::to_vector({ 2, 3, 4 })),
- v_on.on_next(350, rxu::to_vector({ 4, 5, 6 })),
+ v_on.next(280, rxu::to_vector({ 2, 3, 4 })),
+ v_on.next(350, rxu::to_vector({ 4, 5, 6 })),
});
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
@@ -411,16 +411,16 @@ SCENARIO("buffer count error 2", "[buffer][operators]"){
std::runtime_error ex("buffer on_error from source");
auto xs = sc.make_hot_observable({
- on.on_next(100, 1),
- on.on_next(210, 2),
- on.on_next(240, 3),
- on.on_next(280, 4),
- on.on_next(320, 5),
- on.on_next(350, 6),
- on.on_next(380, 7),
- on.on_next(420, 8),
- on.on_next(470, 9),
- on.on_error(600, ex)
+ on.next(100, 1),
+ on.next(210, 2),
+ on.next(240, 3),
+ on.next(280, 4),
+ on.next(320, 5),
+ on.next(350, 6),
+ on.next(380, 7),
+ on.next(420, 8),
+ on.next(470, 9),
+ on.error(600, ex)
});
WHEN("group each int with the next 2 ints"){
@@ -436,10 +436,10 @@ SCENARIO("buffer count error 2", "[buffer][operators]"){
THEN("the output contains groups of ints"){
auto required = rxu::to_vector({
- v_on.on_next(280, rxu::to_vector({ 2, 3, 4 })),
- v_on.on_next(350, rxu::to_vector({ 4, 5, 6 })),
- v_on.on_next(420, rxu::to_vector({ 6, 7, 8 })),
- v_on.on_error(600, ex)
+ v_on.next(280, rxu::to_vector({ 2, 3, 4 })),
+ v_on.next(350, rxu::to_vector({ 4, 5, 6 })),
+ v_on.next(420, rxu::to_vector({ 6, 7, 8 })),
+ v_on.error(600, ex)
});
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
diff --git a/Rx/v2/test/operators/combine_latest.1.cpp b/Rx/v2/test/operators/combine_latest.1.cpp
index acf2e93..0493c78 100644
--- a/Rx/v2/test/operators/combine_latest.1.cpp
+++ b/Rx/v2/test/operators/combine_latest.1.cpp
@@ -12,19 +12,19 @@ SCENARIO("combine_latest interleaved with tail", "[combine_latest][join][operato
const rxsc::test::messages<int> on;
auto o1 = sc.make_hot_observable({
- on.on_next(150, 1),
- on.on_next(215, 2),
- on.on_next(225, 4),
- on.on_completed(230)
+ on.next(150, 1),
+ on.next(215, 2),
+ on.next(225, 4),
+ on.completed(230)
});
auto o2 = sc.make_hot_observable({
- on.on_next(150, 1),
- on.on_next(220, 3),
- on.on_next(230, 5),
- on.on_next(235, 6),
- on.on_next(240, 7),
- on.on_completed(250)
+ on.next(150, 1),
+ on.next(220, 3),
+ on.next(230, 5),
+ on.next(235, 6),
+ on.next(240, 7),
+ on.completed(250)
});
WHEN("each int is combined with the latest from the other source"){
@@ -45,12 +45,12 @@ SCENARIO("combine_latest interleaved with tail", "[combine_latest][join][operato
THEN("the output contains combined ints"){
auto required = rxu::to_vector({
- on.on_next(220, 2 + 3),
- on.on_next(225, 4 + 3),
- on.on_next(230, 4 + 5),
- on.on_next(235, 4 + 6),
- on.on_next(240, 4 + 7),
- on.on_completed(250)
+ on.next(220, 2 + 3),
+ on.next(225, 4 + 3),
+ on.next(230, 4 + 5),
+ on.next(235, 4 + 6),
+ on.next(240, 4 + 7),
+ on.completed(250)
});
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
@@ -82,17 +82,17 @@ SCENARIO("combine_latest consecutive", "[combine_latest][join][operators]"){
const rxsc::test::messages<int> on;
auto o1 = sc.make_hot_observable({
- on.on_next(150, 1),
- on.on_next(215, 2),
- on.on_next(225, 4),
- on.on_completed(230)
+ on.next(150, 1),
+ on.next(215, 2),
+ on.next(225, 4),
+ on.completed(230)
});
auto o2 = sc.make_hot_observable({
- on.on_next(150, 1),
- on.on_next(235, 6),
- on.on_next(240, 7),
- on.on_completed(250)
+ on.next(150, 1),
+ on.next(235, 6),
+ on.next(240, 7),
+ on.completed(250)
});
WHEN("each int is combined with the latest from the other source"){
@@ -113,9 +113,9 @@ SCENARIO("combine_latest consecutive", "[combine_latest][join][operators]"){
THEN("the output contains combined ints"){
auto required = rxu::to_vector({
- on.on_next(235, 4 + 6),
- on.on_next(240, 4 + 7),
- on.on_completed(250)
+ on.next(235, 4 + 6),
+ on.next(240, 4 + 7),
+ on.completed(250)
});
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
@@ -149,17 +149,17 @@ SCENARIO("combine_latest consecutive ends with error left", "[combine_latest][jo
std::runtime_error ex("combine_latest on_error from source");
auto o1 = sc.make_hot_observable({
- on.on_next(150, 1),
- on.on_next(215, 2),
- on.on_next(225, 4),
- on.on_error(230, ex)
+ on.next(150, 1),
+ on.next(215, 2),
+ on.next(225, 4),
+ on.error(230, ex)
});
auto o2 = sc.make_hot_observable({
- on.on_next(150, 1),
- on.on_next(235, 6),
- on.on_next(240, 7),
- on.on_completed(250)
+ on.next(150, 1),
+ on.next(235, 6),
+ on.next(240, 7),
+ on.completed(250)
});
WHEN("each int is combined with the latest from the other source"){
@@ -180,7 +180,7 @@ SCENARIO("combine_latest consecutive ends with error left", "[combine_latest][jo
THEN("the output contains only an error"){
auto required = rxu::to_vector({
- on.on_error(230, ex)
+ on.error(230, ex)
});
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
@@ -214,17 +214,17 @@ SCENARIO("combine_latest consecutive ends with error right", "[combine_latest][j
std::runtime_error ex("combine_latest on_error from source");
auto o1 = sc.make_hot_observable({
- on.on_next(150, 1),
- on.on_next(215, 2),
- on.on_next(225, 4),
- on.on_completed(250)
+ on.next(150, 1),
+ on.next(215, 2),
+ on.next(225, 4),
+ on.completed(250)
});
auto o2 = sc.make_hot_observable({
- on.on_next(150, 1),
- on.on_next(235, 6),
- on.on_next(240, 7),
- on.on_error(245, ex)
+ on.next(150, 1),
+ on.next(235, 6),
+ on.next(240, 7),
+ on.error(245, ex)
});
WHEN("each int is combined with the latest from the other source"){
@@ -245,9 +245,9 @@ SCENARIO("combine_latest consecutive ends with error right", "[combine_latest][j
THEN("the output contains combined ints followed by an error"){
auto required = rxu::to_vector({
- on.on_next(235, 4 + 6),
- on.on_next(240, 4 + 7),
- on.on_error(245, ex)
+ on.next(235, 4 + 6),
+ on.next(240, 4 + 7),
+ on.error(245, ex)
});
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
@@ -284,7 +284,7 @@ SCENARIO("combine_latest never N", "[combine_latest][join][operators]"){
for (int i = 0; i < N; ++i) {
n.push_back(
sc.make_hot_observable({
- on.on_next(150, 1)
+ on.next(150, 1)
})
);
}
@@ -336,9 +336,9 @@ SCENARIO("combine_latest empty N", "[combine_latest][join][operators]"){
std::vector<rxcpp::test::testable_observable<int>> e;
for (int i = 0; i < N; ++i) {
e.push_back(
- sc.make_hot_observable({
- on.on_next(150, 1),
- on.on_completed(210 + 10 * i)
+ sc.make_hot_observable({
+ on.next(150, 1),
+ on.completed(210 + 10 * i)
})
);
}
@@ -350,7 +350,7 @@ SCENARIO("combine_latest empty N", "[combine_latest][join][operators]"){
return e[0]
.combine_latest(
[](int v0, int v1, int v2, int v3, int v4, int v5, int v6, int v7, int v8, int v9, int v10, int v11, int v12, int v13, int v14, int v15){
- return v0 + v1 + v2 + v3 + v4 + v5 + v6 + v7 + v8 + v9 + v10 + v11 + v12 + v13 + v14 + v15;
+ return v0 + v1 + v2 + v3 + v4 + v5 + v6 + v7 + v8 + v9 + v10 + v11 + v12 + v13 + v14 + v15;
},
e[1], e[2], e[3], e[4], e[5], e[6], e[7], e[8], e[9], e[10], e[11], e[12], e[13], e[14], e[15]
)
@@ -361,14 +361,14 @@ SCENARIO("combine_latest empty N", "[combine_latest][join][operators]"){
THEN("the output contains only complete message"){
auto required = rxu::to_vector({
- on.on_completed(200 + 10 * N)
+ on.completed(200 + 10 * N)
});
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
}
THEN("there was one subscription and one unsubscription to each observable"){
-
+
int i = 0;
std::for_each(e.begin(), e.end(), [&](rxcpp::test::testable_observable<int> &s){
auto required = rxu::to_vector({
@@ -389,12 +389,12 @@ SCENARIO("combine_latest never/empty", "[combine_latest][join][operators]"){
const rxsc::test::messages<int> on;
auto n = sc.make_hot_observable({
- on.on_next(150, 1)
+ on.next(150, 1)
});
auto e = sc.make_hot_observable({
- on.on_next(150, 1),
- on.on_completed(210)
+ on.next(150, 1),
+ on.completed(210)
});
WHEN("each int is combined with the latest from the other source"){
@@ -445,12 +445,12 @@ SCENARIO("combine_latest empty/never", "[combine_latest][join][operators]"){
const rxsc::test::messages<int> on;
auto e = sc.make_hot_observable({
- on.on_next(150, 1),
- on.on_completed(210)
+ on.next(150, 1),
+ on.completed(210)
});
auto n = sc.make_hot_observable({
- on.on_next(150, 1)
+ on.next(150, 1)
});
WHEN("each int is combined with the latest from the other source"){
@@ -501,14 +501,14 @@ SCENARIO("combine_latest empty/return", "[combine_latest][join][operators]"){
const rxsc::test::messages<int> on;
auto e = sc.make_hot_observable({
- on.on_next(150, 1),
- on.on_completed(210)
+ on.next(150, 1),
+ on.completed(210)
});
auto o = sc.make_hot_observable({
- on.on_next(150, 1),
- on.on_next(215, 2),
- on.on_completed(220)
+ on.next(150, 1),
+ on.next(215, 2),
+ on.completed(220)
});
WHEN("each int is combined with the latest from the other source"){
@@ -529,7 +529,7 @@ SCENARIO("combine_latest empty/return", "[combine_latest][join][operators]"){
THEN("the output contains only complete message"){
auto required = rxu::to_vector({
- on.on_completed(220)
+ on.completed(220)
});
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
@@ -561,14 +561,14 @@ SCENARIO("combine_latest return/empty", "[combine_latest][join][operators]"){
const rxsc::test::messages<int> on;
auto o = sc.make_hot_observable({
- on.on_next(150, 1),
- on.on_next(215, 2),
- on.on_completed(220)
+ on.next(150, 1),
+ on.next(215, 2),
+ on.completed(220)
});
auto e = sc.make_hot_observable({
- on.on_next(150, 1),
- on.on_completed(210)
+ on.next(150, 1),
+ on.completed(210)
});
WHEN("each int is combined with the latest from the other source"){
@@ -589,7 +589,7 @@ SCENARIO("combine_latest return/empty", "[combine_latest][join][operators]"){
THEN("the output contains only complete message"){
auto required = rxu::to_vector({
- on.on_completed(220)
+ on.completed(220)
});
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
@@ -621,13 +621,13 @@ SCENARIO("combine_latest never/return", "[combine_latest][join][operators]"){
const rxsc::test::messages<int> on;
auto n = sc.make_hot_observable({
- on.on_next(150, 1)
+ on.next(150, 1)
});
auto o = sc.make_hot_observable({
- on.on_next(150, 1),
- on.on_next(215, 2),
- on.on_completed(220)
+ on.next(150, 1),
+ on.next(215, 2),
+ on.completed(220)
});
WHEN("each int is combined with the latest from the other source"){
@@ -678,13 +678,13 @@ SCENARIO("combine_latest return/never", "[combine_latest][join][operators]"){
const rxsc::test::messages<int> on;
auto o = sc.make_hot_observable({
- on.on_next(150, 1),
- on.on_next(215, 2),
- on.on_completed(220)
+ on.next(150, 1),
+ on.next(215, 2),
+ on.completed(220)
});
auto n = sc.make_hot_observable({
- on.on_next(150, 1)
+ on.next(150, 1)
});
WHEN("each int is combined with the latest from the other source"){
diff --git a/Rx/v2/test/operators/combine_latest.2.cpp b/Rx/v2/test/operators/combine_latest.2.cpp
index 4e26fcc..7406a26 100644
--- a/Rx/v2/test/operators/combine_latest.2.cpp
+++ b/Rx/v2/test/operators/combine_latest.2.cpp
@@ -12,15 +12,15 @@ SCENARIO("combine_latest return/return", "[combine_latest][join][operators]"){
const rxsc::test::messages<int> on;
auto o1 = sc.make_hot_observable({
- on.on_next(150, 1),
- on.on_next(215, 2),
- on.on_completed(230)
+ on.next(150, 1),
+ on.next(215, 2),
+ on.completed(230)
});
auto o2 = sc.make_hot_observable({
- on.on_next(150, 1),
- on.on_next(220, 3),
- on.on_completed(240)
+ on.next(150, 1),
+ on.next(220, 3),
+ on.completed(240)
});
WHEN("each int is combined with the latest from the other source"){
@@ -41,8 +41,8 @@ SCENARIO("combine_latest return/return", "[combine_latest][join][operators]"){
THEN("the output contains combined ints"){
auto required = rxu::to_vector({
- on.on_next(220, 2 + 3),
- on.on_completed(240)
+ on.next(220, 2 + 3),
+ on.completed(240)
});
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
@@ -76,13 +76,13 @@ SCENARIO("combine_latest empty/error", "[combine_latest][join][operators]"){
std::runtime_error ex("combine_latest on_error from source");
auto emp = sc.make_hot_observable({
- on.on_next(150, 1),
- on.on_completed(230)
+ on.next(150, 1),
+ on.completed(230)
});
auto err = sc.make_hot_observable({
- on.on_next(150, 1),
- on.on_error(220, ex)
+ on.next(150, 1),
+ on.error(220, ex)
});
WHEN("each int is combined with the latest from the other source"){
@@ -103,7 +103,7 @@ SCENARIO("combine_latest empty/error", "[combine_latest][join][operators]"){
THEN("the output contains only error message"){
auto required = rxu::to_vector({
- on.on_error(220, ex)
+ on.error(220, ex)
});
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
@@ -137,13 +137,13 @@ SCENARIO("combine_latest error/empty", "[combine_latest][join][operators]"){
std::runtime_error ex("combine_latest on_error from source");
auto err = sc.make_hot_observable({
- on.on_next(150, 1),
- on.on_error(220, ex)
+ on.next(150, 1),
+ on.error(220, ex)
});
auto emp = sc.make_hot_observable({
- on.on_next(150, 1),
- on.on_completed(230)
+ on.next(150, 1),
+ on.completed(230)
});
WHEN("each int is combined with the latest from the other source"){
@@ -164,7 +164,7 @@ SCENARIO("combine_latest error/empty", "[combine_latest][join][operators]"){
THEN("the output contains only error message"){
auto required = rxu::to_vector({
- on.on_error(220, ex)
+ on.error(220, ex)
});
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
@@ -198,14 +198,14 @@ SCENARIO("combine_latest return/error", "[combine_latest][join][operators]"){
std::runtime_error ex("combine_latest on_error from source");
auto o = sc.make_hot_observable({
- on.on_next(150, 1),
- on.on_next(210, 2),
- on.on_completed(230)
+ on.next(150, 1),
+ on.next(210, 2),
+ on.completed(230)
});
auto err = sc.make_hot_observable({
- on.on_next(150, 1),
- on.on_error(220, ex)
+ on.next(150, 1),
+ on.error(220, ex)
});
WHEN("each int is combined with the latest from the other source"){
@@ -226,7 +226,7 @@ SCENARIO("combine_latest return/error", "[combine_latest][join][operators]"){
THEN("the output contains only error message"){
auto required = rxu::to_vector({
- on.on_error(220, ex)
+ on.error(220, ex)
});
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
@@ -260,14 +260,14 @@ SCENARIO("combine_latest error/return", "[combine_latest][join][operators]"){
std::runtime_error ex("combine_latest on_error from source");
auto err = sc.make_hot_observable({
- on.on_next(150, 1),
- on.on_error(220, ex)
+ on.next(150, 1),
+ on.error(220, ex)
});
auto ret = sc.make_hot_observable({
- on.on_next(150, 1),
- on.on_next(210, 2),
- on.on_completed(230)
+ on.next(150, 1),
+ on.next(210, 2),
+ on.completed(230)
});
WHEN("each int is combined with the latest from the other source"){
@@ -288,7 +288,7 @@ SCENARIO("combine_latest error/return", "[combine_latest][join][operators]"){
THEN("the output contains only error message"){
auto required = rxu::to_vector({
- on.on_error(220, ex)
+ on.error(220, ex)
});
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
@@ -323,13 +323,13 @@ SCENARIO("combine_latest error/error", "[combine_latest][join][operators]"){
std::runtime_error ex2("combine_latest on_error from source 2");
auto err1 = sc.make_hot_observable({
- on.on_next(150, 1),
- on.on_error(220, ex1)
+ on.next(150, 1),
+ on.error(220, ex1)
});
auto err2 = sc.make_hot_observable({
- on.on_next(150, 1),
- on.on_error(230, ex2)
+ on.next(150, 1),
+ on.error(230, ex2)
});
WHEN("each int is combined with the latest from the other source"){
@@ -350,7 +350,7 @@ SCENARIO("combine_latest error/error", "[combine_latest][join][operators]"){
THEN("the output contains only error message"){
auto required = rxu::to_vector({
- on.on_error(220, ex1)
+ on.error(220, ex1)
});
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
@@ -385,14 +385,14 @@ SCENARIO("combine_latest next+error/error", "[combine_latest][join][operators]")
std::runtime_error ex2("combine_latest on_error from source 2");
auto err1 = sc.make_hot_observable({
- on.on_next(150, 1),
- on.on_next(210, 2),
- on.on_error(220, ex1)
+ on.next(150, 1),
+ on.next(210, 2),
+ on.error(220, ex1)
});
auto err2 = sc.make_hot_observable({
- on.on_next(150, 1),
- on.on_error(230, ex2)
+ on.next(150, 1),
+ on.error(230, ex2)
});
WHEN("each int is combined with the latest from the other source"){
@@ -413,7 +413,7 @@ SCENARIO("combine_latest next+error/error", "[combine_latest][join][operators]")
THEN("the output contains only error message"){
auto required = rxu::to_vector({
- on.on_error(220, ex1)
+ on.error(220, ex1)
});
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
@@ -448,14 +448,14 @@ SCENARIO("combine_latest error/next+error", "[combine_latest][join][operators]")
std::runtime_error ex2("combine_latest on_error from source 2");
auto err1 = sc.make_hot_observable({
- on.on_next(150, 1),
- on.on_error(230, ex1)
+ on.next(150, 1),
+ on.error(230, ex1)
});
auto err2 = sc.make_hot_observable({
- on.on_next(150, 1),
- on.on_next(210, 2),
- on.on_error(220, ex2)
+ on.next(150, 1),
+ on.next(210, 2),
+ on.error(220, ex2)
});
WHEN("each int is combined with the latest from the other source"){
@@ -476,7 +476,7 @@ SCENARIO("combine_latest error/next+error", "[combine_latest][join][operators]")
THEN("the output contains only error message"){
auto required = rxu::to_vector({
- on.on_error(220, ex2)
+ on.error(220, ex2)
});
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
@@ -510,12 +510,12 @@ SCENARIO("combine_latest never/error", "[combine_latest][join][operators]"){
std::runtime_error ex("combine_latest on_error from source");
auto n = sc.make_hot_observable({
- on.on_next(150, 1)
+ on.next(150, 1)
});
auto err = sc.make_hot_observable({
- on.on_next(150, 1),
- on.on_error(220, ex)
+ on.next(150, 1),
+ on.error(220, ex)
});
WHEN("each int is combined with the latest from the other source"){
@@ -536,7 +536,7 @@ SCENARIO("combine_latest never/error", "[combine_latest][join][operators]"){
THEN("the output contains only error message"){
auto required = rxu::to_vector({
- on.on_error(220, ex)
+ on.error(220, ex)
});
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
@@ -570,12 +570,12 @@ SCENARIO("combine_latest error/never", "[combine_latest][join][operators]"){
std::runtime_error ex("combine_latest on_error from source");
auto err = sc.make_hot_observable({
- on.on_next(150, 1),
- on.on_error(220, ex)
+ on.next(150, 1),
+ on.error(220, ex)
});
auto n = sc.make_hot_observable({
- on.on_next(150, 1)
+ on.next(150, 1)
});
WHEN("each int is combined with the latest from the other source"){
@@ -596,7 +596,7 @@ SCENARIO("combine_latest error/never", "[combine_latest][join][operators]"){
THEN("the output contains only error message"){
auto required = rxu::to_vector({
- on.on_error(220, ex)
+ on.error(220, ex)
});
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
@@ -630,14 +630,14 @@ SCENARIO("combine_latest error after completed left", "[combine_latest][join][op
std::runtime_error ex("combine_latest on_error from source");
auto ret = sc.make_hot_observable({
- on.on_next(150, 1),
- on.on_next(210, 2),
- on.on_completed(215)
+ on.next(150, 1),
+ on.next(210, 2),
+ on.completed(215)
});
auto err = sc.make_hot_observable({
- on.on_next(150, 1),
- on.on_error(220, ex)
+ on.next(150, 1),
+ on.error(220, ex)
});
WHEN("each int is combined with the latest from the other source"){
@@ -658,7 +658,7 @@ SCENARIO("combine_latest error after completed left", "[combine_latest][join][op
THEN("the output contains only error message"){
auto required = rxu::to_vector({
- on.on_error(220, ex)
+ on.error(220, ex)
});
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
@@ -692,14 +692,14 @@ SCENARIO("combine_latest error after completed right", "[combine_latest][join][o
std::runtime_error ex("combine_latest on_error from source");
auto err = sc.make_hot_observable({
- on.on_next(150, 1),
- on.on_error(220, ex)
+ on.next(150, 1),
+ on.error(220, ex)
});
auto ret = sc.make_hot_observable({
- on.on_next(150, 1),
- on.on_next(210, 2),
- on.on_completed(215)
+ on.next(150, 1),
+ on.next(210, 2),
+ on.completed(215)
});
WHEN("each int is combined with the latest from the other source"){
@@ -720,7 +720,7 @@ SCENARIO("combine_latest error after completed right", "[combine_latest][join][o
THEN("the output contains only error message"){
auto required = rxu::to_vector({
- on.on_error(220, ex)
+ on.error(220, ex)
});
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
@@ -754,15 +754,15 @@ SCENARIO("combine_latest selector throws", "[combine_latest][join][operators]"){
std::runtime_error ex("combine_latest on_error from source");
auto o1 = sc.make_hot_observable({
- on.on_next(150, 1),
- on.on_next(215, 2),
- on.on_completed(230)
+ on.next(150, 1),
+ on.next(215, 2),
+ on.completed(230)
});
auto o2 = sc.make_hot_observable({
- on.on_next(150, 1),
- on.on_next(220, 3),
- on.on_completed(240)
+ on.next(150, 1),
+ on.next(220, 3),
+ on.completed(240)
});
WHEN("each int is combined with the latest from the other source"){
@@ -783,7 +783,7 @@ SCENARIO("combine_latest selector throws", "[combine_latest][join][operators]"){
THEN("the output contains only error"){
auto required = rxu::to_vector({
- on.on_error(220, ex)
+ on.error(220, ex)
});
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
@@ -822,8 +822,8 @@ SCENARIO("combine_latest selector throws N", "[combine_latest][join][operators]"
for (int i = 0; i < N; ++i) {
e.push_back(
sc.make_hot_observable({
- on.on_next(210 + 10 * i, 1),
- on.on_completed(500)
+ on.next(210 + 10 * i, 1),
+ on.completed(500)
})
);
}
@@ -846,7 +846,7 @@ SCENARIO("combine_latest selector throws N", "[combine_latest][join][operators]"
THEN("the output contains only error"){
auto required = rxu::to_vector({
- on.on_error(200 + 10 * N, ex)
+ on.error(200 + 10 * N, ex)
});
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
@@ -878,10 +878,10 @@ SCENARIO("combine_latest typical N", "[combine_latest][join][operators]"){
for (int i = 0; i < N; ++i) {
o.push_back(
sc.make_hot_observable({
- on.on_next(150, 1),
- on.on_next(210 + 10 * i, i + 1),
- on.on_next(410 + 10 * i, i + N + 1),
- on.on_completed(800)
+ on.next(150, 1),
+ on.next(210 + 10 * i, i + 1),
+ on.next(410 + 10 * i, i + N + 1),
+ on.completed(800)
})
);
}
@@ -904,12 +904,12 @@ SCENARIO("combine_latest typical N", "[combine_latest][join][operators]"){
THEN("the output contains combined ints"){
auto required = rxu::to_vector({
- on.on_next(200 + 10 * N, N * (N + 1) / 2)
+ on.next(200 + 10 * N, N * (N + 1) / 2)
});
for (int i = 0; i < N; ++i) {
- required.push_back(on.on_next(410 + 10 * i, N * (N + 1) / 2 + N + N * i));
+ required.push_back(on.next(410 + 10 * i, N * (N + 1) / 2 + N + N * i));
}
- required.push_back(on.on_completed(800));
+ required.push_back(on.completed(800));
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
}
diff --git a/Rx/v2/test/operators/concat.cpp b/Rx/v2/test/operators/concat.cpp
index 91be2be..f37ec24 100644
--- a/Rx/v2/test/operators/concat.cpp
+++ b/Rx/v2/test/operators/concat.cpp
@@ -102,37 +102,37 @@ SCENARIO("concat completes", "[concat][join][operators]"){
const rxsc::test::messages<rx::observable<int>> o_on;
auto ys1 = sc.make_cold_observable({
- on.on_next(10, 101),
- on.on_next(20, 102),
- on.on_next(110, 103),
- on.on_next(120, 104),
- on.on_next(210, 105),
- on.on_next(220, 106),
- on.on_completed(230)
+ on.next(10, 101),
+ on.next(20, 102),
+ on.next(110, 103),
+ on.next(120, 104),
+ on.next(210, 105),
+ on.next(220, 106),
+ on.completed(230)
});
auto ys2 = sc.make_cold_observable({
- on.on_next(10, 201),
- on.on_next(20, 202),
- on.on_next(30, 203),
- on.on_next(40, 204),
- on.on_completed(50)
+ on.next(10, 201),
+ on.next(20, 202),
+ on.next(30, 203),
+ on.next(40, 204),
+ on.completed(50)
});
auto ys3 = sc.make_cold_observable({
- on.on_next(10, 301),
- on.on_next(20, 302),
- on.on_next(30, 303),
- on.on_next(40, 304),
- on.on_next(120, 305),
- on.on_completed(150)
+ on.next(10, 301),
+ on.next(20, 302),
+ on.next(30, 303),
+ on.next(40, 304),
+ on.next(120, 305),
+ on.completed(150)
});
auto xs = sc.make_hot_observable({
- o_on.on_next(300, ys1),
- o_on.on_next(400, ys2),
- o_on.on_next(500, ys3),
- o_on.on_completed(600)
+ o_on.next(300, ys1),
+ o_on.next(400, ys2),
+ o_on.next(500, ys3),
+ o_on.completed(600)
});
WHEN("each int is merged"){
@@ -148,22 +148,22 @@ SCENARIO("concat completes", "[concat][join][operators]"){
THEN("the output contains merged ints"){
auto required = rxu::to_vector({
- on.on_next(310, 101),
- on.on_next(320, 102),
- on.on_next(410, 103),
- on.on_next(420, 104),
- on.on_next(510, 105),
- on.on_next(520, 106),
- on.on_next(540, 201),
- on.on_next(550, 202),
- on.on_next(560, 203),
- on.on_next(570, 204),
- on.on_next(590, 301),
- on.on_next(600, 302),
- on.on_next(610, 303),
- on.on_next(620, 304),
- on.on_next(700, 305),
- on.on_completed(730)
+ on.next(310, 101),
+ on.next(320, 102),
+ on.next(410, 103),
+ on.next(420, 104),
+ on.next(510, 105),
+ on.next(520, 106),
+ on.next(540, 201),
+ on.next(550, 202),
+ on.next(560, 203),
+ on.next(570, 204),
+ on.next(590, 301),
+ on.next(600, 302),
+ on.next(610, 303),
+ on.next(620, 304),
+ on.next(700, 305),
+ on.completed(730)
});
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
diff --git a/Rx/v2/test/operators/concat_map.cpp b/Rx/v2/test/operators/concat_map.cpp
index 7dc1302..0d3402c 100644
--- a/Rx/v2/test/operators/concat_map.cpp
+++ b/Rx/v2/test/operators/concat_map.cpp
@@ -208,17 +208,17 @@ SCENARIO("concat_map completes", "[concat_map][map][operators]"){
const rxsc::test::messages<std::string> s_on;
auto xs = sc.make_cold_observable({
- i_on.on_next(100, 4),
- i_on.on_next(200, 2),
- i_on.on_completed(500)
+ i_on.next(100, 4),
+ i_on.next(200, 2),
+ i_on.completed(500)
});
auto ys = sc.make_cold_observable({
- s_on.on_next(50, "foo"),
- s_on.on_next(100, "bar"),
- s_on.on_next(150, "baz"),
- s_on.on_next(200, "qux"),
- s_on.on_completed(250)
+ s_on.next(50, "foo"),
+ s_on.next(100, "bar"),
+ s_on.next(150, "baz"),
+ s_on.next(200, "qux"),
+ s_on.completed(250)
});
WHEN("each int is mapped to the strings"){
@@ -238,15 +238,15 @@ SCENARIO("concat_map completes", "[concat_map][map][operators]"){
THEN("the output contains strings repeated for each int"){
auto required = rxu::to_vector({
- s_on.on_next(350, "foo"),
- s_on.on_next(400, "bar"),
- s_on.on_next(450, "baz"),
- s_on.on_next(500, "qux"),
- s_on.on_next(600, "foo"),
- s_on.on_next(650, "bar"),
- s_on.on_next(700, "baz"),
- s_on.on_next(750, "qux"),
- s_on.on_completed(800)
+ s_on.next(350, "foo"),
+ s_on.next(400, "bar"),
+ s_on.next(450, "baz"),
+ s_on.next(500, "qux"),
+ s_on.next(600, "foo"),
+ s_on.next(650, "bar"),
+ s_on.next(700, "baz"),
+ s_on.next(750, "qux"),
+ s_on.completed(800)
});
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
diff --git a/Rx/v2/test/operators/distinct_until_changed.cpp b/Rx/v2/test/operators/distinct_until_changed.cpp
index 150b086..cf8d5cf 100644
--- a/Rx/v2/test/operators/distinct_until_changed.cpp
+++ b/Rx/v2/test/operators/distinct_until_changed.cpp
@@ -12,7 +12,7 @@ SCENARIO("distinct_until_changed - never", "[distinct_until_changed][operators]"
const rxsc::test::messages<int> on;
auto xs = sc.make_hot_observable({
- on.on_next(150, 1)
+ on.next(150, 1)
});
WHEN("distinct values are taken"){
@@ -47,8 +47,8 @@ SCENARIO("distinct_until_changed - empty", "[distinct_until_changed][operators]"
const rxsc::test::messages<int> on;
auto xs = sc.make_hot_observable({
- on.on_next(150, 1),
- on.on_completed(250)
+ on.next(150, 1),
+ on.completed(250)
});
WHEN("distinct values are taken"){
@@ -61,7 +61,7 @@ SCENARIO("distinct_until_changed - empty", "[distinct_until_changed][operators]"
THEN("the output only contains complete message"){
auto required = rxu::to_vector({
- on.on_completed(250)
+ on.completed(250)
});
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
@@ -86,9 +86,9 @@ SCENARIO("distinct_until_changed - return", "[distinct_until_changed][operators]
const rxsc::test::messages<int> on;
auto xs = sc.make_hot_observable({
- on.on_next(150, 1),
- on.on_next(210, 2),
- on.on_completed(250)
+ on.next(150, 1),
+ on.next(210, 2),
+ on.completed(250)
});
WHEN("distinct values are taken"){
@@ -101,8 +101,8 @@ SCENARIO("distinct_until_changed - return", "[distinct_until_changed][operators]
THEN("the output only contains distinct items sent while subscribed"){
auto required = rxu::to_vector({
- on.on_next(210, 2),
- on.on_completed(250)
+ on.next(210, 2),
+ on.completed(250)
});
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
@@ -127,10 +127,10 @@ SCENARIO("distinct_until_changed - throw", "[distinct_until_changed][operators]"
const rxsc::test::messages<int> on;
std::runtime_error ex("distinct_until_changed on_error from source");
-
+
auto xs = sc.make_hot_observable({
- on.on_next(150, 1),
- on.on_error(250, ex)
+ on.next(150, 1),
+ on.error(250, ex)
});
WHEN("distinct values are taken"){
@@ -143,7 +143,7 @@ SCENARIO("distinct_until_changed - throw", "[distinct_until_changed][operators]"
THEN("the output only contains only error"){
auto required = rxu::to_vector({
- on.on_error(250, ex)
+ on.error(250, ex)
});
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
@@ -168,12 +168,12 @@ SCENARIO("distinct_until_changed - all changes", "[distinct_until_changed][opera
const rxsc::test::messages<int> on;
auto xs = sc.make_hot_observable({
- on.on_next(150, 1),
- on.on_next(210, 2),
- on.on_next(220, 3),
- on.on_next(230, 4),
- on.on_next(240, 5),
- on.on_completed(250)
+ on.next(150, 1),
+ on.next(210, 2),
+ on.next(220, 3),
+ on.next(230, 4),
+ on.next(240, 5),
+ on.completed(250)
});
WHEN("distinct values are taken"){
@@ -186,11 +186,11 @@ SCENARIO("distinct_until_changed - all changes", "[distinct_until_changed][opera
THEN("the output only contains distinct items sent while subscribed"){
auto required = rxu::to_vector({
- on.on_next(210, 2),
- on.on_next(220, 3),
- on.on_next(230, 4),
- on.on_next(240, 5),
- on.on_completed(250)
+ on.next(210, 2),
+ on.next(220, 3),
+ on.next(230, 4),
+ on.next(240, 5),
+ on.completed(250)
});
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
@@ -215,12 +215,12 @@ SCENARIO("distinct_until_changed - all same", "[distinct_until_changed][operator
const rxsc::test::messages<int> on;
auto xs = sc.make_hot_observable({
- on.on_next(150, 1),
- on.on_next(210, 2),
- on.on_next(220, 2),
- on.on_next(230, 2),
- on.on_next(240, 2),
- on.on_completed(250)
+ on.next(150, 1),
+ on.next(210, 2),
+ on.next(220, 2),
+ on.next(230, 2),
+ on.next(240, 2),
+ on.completed(250)
});
WHEN("distinct values are taken"){
@@ -233,8 +233,8 @@ SCENARIO("distinct_until_changed - all same", "[distinct_until_changed][operator
THEN("the output only contains distinct items sent while subscribed"){
auto required = rxu::to_vector({
- on.on_next(210, 2),
- on.on_completed(250)
+ on.next(210, 2),
+ on.completed(250)
});
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
@@ -259,15 +259,15 @@ SCENARIO("distinct_until_changed - some changes", "[distinct_until_changed][oper
const rxsc::test::messages<int> on;
auto xs = sc.make_hot_observable({
- on.on_next(150, 1),
- on.on_next(210, 2), //*
- on.on_next(215, 3), //*
- on.on_next(220, 3),
- on.on_next(225, 2), //*
- on.on_next(230, 2),
- on.on_next(230, 1), //*
- on.on_next(240, 2), //*
- on.on_completed(250)
+ on.next(150, 1),
+ on.next(210, 2), //*
+ on.next(215, 3), //*
+ on.next(220, 3),
+ on.next(225, 2), //*
+ on.next(230, 2),
+ on.next(230, 1), //*
+ on.next(240, 2), //*
+ on.completed(250)
});
WHEN("distinct values are taken"){
@@ -280,12 +280,12 @@ SCENARIO("distinct_until_changed - some changes", "[distinct_until_changed][oper
THEN("the output only contains distinct items sent while subscribed"){
auto required = rxu::to_vector({
- on.on_next(210, 2), //*
- on.on_next(215, 3), //*
- on.on_next(225, 2), //*
- on.on_next(230, 1), //*
- on.on_next(240, 2), //*
- on.on_completed(250)
+ on.next(210, 2), //*
+ on.next(215, 3), //*
+ on.next(225, 2), //*
+ on.next(230, 1), //*
+ on.next(240, 2), //*
+ on.completed(250)
});
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
diff --git a/Rx/v2/test/operators/filter.cpp b/Rx/v2/test/operators/filter.cpp
index 529f10a..fdab02a 100644
--- a/Rx/v2/test/operators/filter.cpp
+++ b/Rx/v2/test/operators/filter.cpp
@@ -31,21 +31,21 @@ SCENARIO("filter stops on completion", "[filter][operators]"){
long invoked = 0;
auto xs = sc.make_hot_observable({
- on.on_next(110, 1),
- on.on_next(180, 2),
- on.on_next(230, 3),
- on.on_next(270, 4),
- on.on_next(340, 5),
- on.on_next(380, 6),
- on.on_next(390, 7),
- on.on_next(450, 8),
- on.on_next(470, 9),
- on.on_next(560, 10),
- on.on_next(580, 11),
- on.on_completed(600),
- on.on_next(610, 12),
- on.on_error(620, std::runtime_error("error in unsubscribed stream")),
- on.on_completed(630)
+ on.next(110, 1),
+ on.next(180, 2),
+ on.next(230, 3),
+ on.next(270, 4),
+ on.next(340, 5),
+ on.next(380, 6),
+ on.next(390, 7),
+ on.next(450, 8),
+ on.next(470, 9),
+ on.next(560, 10),
+ on.next(580, 11),
+ on.completed(600),
+ on.next(610, 12),
+ on.error(620, std::runtime_error("error in unsubscribed stream")),
+ on.completed(630)
});
WHEN("filtered to ints that are primes"){
@@ -76,11 +76,11 @@ SCENARIO("filter stops on completion", "[filter][operators]"){
);
THEN("the output only contains primes"){
auto required = rxu::to_vector({
- on.on_next(230, 3),
- on.on_next(340, 5),
- on.on_next(390, 7),
- on.on_next(580, 11),
- on.on_completed(600)
+ on.next(230, 3),
+ on.next(340, 5),
+ on.next(390, 7),
+ on.next(580, 11),
+ on.completed(600)
});
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
@@ -111,18 +111,18 @@ SCENARIO("filter stops on disposal", "[where][filter][operators]"){
long invoked = 0;
auto xs = sc.make_hot_observable({
- on.on_next(110, 1),
- on.on_next(180, 2),
- on.on_next(230, 3),
- on.on_next(270, 4),
- on.on_next(340, 5),
- on.on_next(380, 6),
- on.on_next(390, 7),
- on.on_next(450, 8),
- on.on_next(470, 9),
- on.on_next(560, 10),
- on.on_next(580, 11),
- on.on_completed(600)
+ on.next(110, 1),
+ on.next(180, 2),
+ on.next(230, 3),
+ on.next(270, 4),
+ on.next(340, 5),
+ on.next(380, 6),
+ on.next(390, 7),
+ on.next(450, 8),
+ on.next(470, 9),
+ on.next(560, 10),
+ on.next(580, 11),
+ on.completed(600)
});
WHEN("filtered to ints that are primes"){
@@ -152,9 +152,9 @@ SCENARIO("filter stops on disposal", "[where][filter][operators]"){
THEN("the output only contains primes that arrived before disposal"){
auto required = rxu::to_vector({
- on.on_next(230, 3),
- on.on_next(340, 5),
- on.on_next(390, 7)
+ on.next(230, 3),
+ on.next(340, 5),
+ on.next(390, 7)
});
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
@@ -186,21 +186,21 @@ SCENARIO("filter stops on error", "[where][filter][operators]"){
std::runtime_error ex("filter on_error from source");
auto xs = sc.make_hot_observable({
- on.on_next(110, 1),
- on.on_next(180, 2),
- on.on_next(230, 3),
- on.on_next(270, 4),
- on.on_next(340, 5),
- on.on_next(380, 6),
- on.on_next(390, 7),
- on.on_next(450, 8),
- on.on_next(470, 9),
- on.on_next(560, 10),
- on.on_next(580, 11),
- on.on_error(600, ex),
- on.on_next(610, 12),
- on.on_error(620, std::runtime_error("error in unsubscribed stream")),
- on.on_completed(630)
+ on.next(110, 1),
+ on.next(180, 2),
+ on.next(230, 3),
+ on.next(270, 4),
+ on.next(340, 5),
+ on.next(380, 6),
+ on.next(390, 7),
+ on.next(450, 8),
+ on.next(470, 9),
+ on.next(560, 10),
+ on.next(580, 11),
+ on.error(600, ex),
+ on.next(610, 12),
+ on.error(620, std::runtime_error("error in unsubscribed stream")),
+ on.completed(630)
});
WHEN("filtered to ints that are primes"){
@@ -229,11 +229,11 @@ SCENARIO("filter stops on error", "[where][filter][operators]"){
THEN("the output only contains primes"){
auto required = rxu::to_vector({
- on.on_next(230, 3),
- on.on_next(340, 5),
- on.on_next(390, 7),
- on.on_next(580, 11),
- on.on_error(600, ex),
+ on.next(230, 3),
+ on.next(340, 5),
+ on.next(390, 7),
+ on.next(580, 11),
+ on.error(600, ex),
});
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
@@ -265,21 +265,21 @@ SCENARIO("filter stops on throw from predicate", "[where][filter][operators]"){
std::runtime_error ex("filter predicate error");
auto xs = sc.make_hot_observable({
- on.on_next(110, 1),
- on.on_next(180, 2),
- on.on_next(230, 3),
- on.on_next(270, 4),
- on.on_next(340, 5),
- on.on_next(380, 6),
- on.on_next(390, 7),
- on.on_next(450, 8),
- on.on_next(470, 9),
- on.on_next(560, 10),
- on.on_next(580, 11),
- on.on_completed(600),
- on.on_next(610, 12),
- on.on_error(620, std::runtime_error("error in unsubscribed stream")),
- on.on_completed(630)
+ on.next(110, 1),
+ on.next(180, 2),
+ on.next(230, 3),
+ on.next(270, 4),
+ on.next(340, 5),
+ on.next(380, 6),
+ on.next(390, 7),
+ on.next(450, 8),
+ on.next(470, 9),
+ on.next(560, 10),
+ on.next(580, 11),
+ on.completed(600),
+ on.next(610, 12),
+ on.error(620, std::runtime_error("error in unsubscribed stream")),
+ on.completed(630)
});
WHEN("filtered to ints that are primes"){
@@ -314,9 +314,9 @@ SCENARIO("filter stops on throw from predicate", "[where][filter][operators]"){
THEN("the output only contains primes"){
auto required = rxu::to_vector({
- on.on_next(230, 3),
- on.on_next(340, 5),
- on.on_error(380, ex)
+ on.next(230, 3),
+ on.next(340, 5),
+ on.error(380, ex)
});
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
@@ -346,21 +346,21 @@ SCENARIO("filter stops on dispose from predicate", "[where][filter][operators]")
long invoked = 0;
auto xs = sc.make_hot_observable({
- on.on_next(110, 1),
- on.on_next(180, 2),
- on.on_next(230, 3),
- on.on_next(270, 4),
- on.on_next(340, 5),
- on.on_next(380, 6),
- on.on_next(390, 7),
- on.on_next(450, 8),
- on.on_next(470, 9),
- on.on_next(560, 10),
- on.on_next(580, 11),
- on.on_completed(600),
- on.on_next(610, 12),
- on.on_error(620, std::exception()),
- on.on_completed(630)
+ on.next(110, 1),
+ on.next(180, 2),
+ on.next(230, 3),
+ on.next(270, 4),
+ on.next(340, 5),
+ on.next(380, 6),
+ on.next(390, 7),
+ on.next(450, 8),
+ on.next(470, 9),
+ on.next(560, 10),
+ on.next(580, 11),
+ on.completed(600),
+ on.next(610, 12),
+ on.error(620, std::exception()),
+ on.completed(630)
});
auto res = w.make_subscriber<int>();
@@ -402,9 +402,9 @@ SCENARIO("filter stops on dispose from predicate", "[where][filter][operators]")
THEN("the output only contains primes"){
auto required = rxu::to_vector({
- on.on_next(230, 3),
- on.on_next(340, 5),
- on.on_next(390, 7)
+ on.next(230, 3),
+ on.next(340, 5),
+ on.next(390, 7)
});
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
diff --git a/Rx/v2/test/operators/flat_map.cpp b/Rx/v2/test/operators/flat_map.cpp
index 9f99055..8490de8 100644
--- a/Rx/v2/test/operators/flat_map.cpp
+++ b/Rx/v2/test/operators/flat_map.cpp
@@ -242,19 +242,19 @@ SCENARIO("flat_map completes", "[flat_map][map][operators]"){
const rxsc::test::messages<std::string> s_on;
auto xs = sc.make_cold_observable({
- i_on.on_next(100, 4),
- i_on.on_next(200, 2),
- i_on.on_next(300, 3),
- i_on.on_next(400, 1),
- i_on.on_completed(500)
+ i_on.next(100, 4),
+ i_on.next(200, 2),
+ i_on.next(300, 3),
+ i_on.next(400, 1),
+ i_on.completed(500)
});
auto ys = sc.make_cold_observable({
- s_on.on_next(50, "foo"),
- s_on.on_next(100, "bar"),
- s_on.on_next(150, "baz"),
- s_on.on_next(200, "qux"),
- s_on.on_completed(250)
+ s_on.next(50, "foo"),
+ s_on.next(100, "bar"),
+ s_on.next(150, "baz"),
+ s_on.next(200, "qux"),
+ s_on.completed(250)
});
WHEN("each int is mapped to the strings"){
@@ -274,23 +274,23 @@ SCENARIO("flat_map completes", "[flat_map][map][operators]"){
THEN("the output contains strings repeated for each int"){
auto required = rxu::to_vector({
- s_on.on_next(350, "foo"),
- s_on.on_next(400, "bar"),
- s_on.on_next(450, "baz"),
- s_on.on_next(450, "foo"),
- s_on.on_next(500, "qux"),
- s_on.on_next(500, "bar"),
- s_on.on_next(550, "baz"),
- s_on.on_next(550, "foo"),
- s_on.on_next(600, "qux"),
- s_on.on_next(600, "bar"),
- s_on.on_next(650, "baz"),
- s_on.on_next(650, "foo"),
- s_on.on_next(700, "qux"),
- s_on.on_next(700, "bar"),
- s_on.on_next(750, "baz"),
- s_on.on_next(800, "qux"),
- s_on.on_completed(850)
+ s_on.next(350, "foo"),
+ s_on.next(400, "bar"),
+ s_on.next(450, "baz"),
+ s_on.next(450, "foo"),
+ s_on.next(500, "qux"),
+ s_on.next(500, "bar"),
+ s_on.next(550, "baz"),
+ s_on.next(550, "foo"),
+ s_on.next(600, "qux"),
+ s_on.next(600, "bar"),
+ s_on.next(650, "baz"),
+ s_on.next(650, "foo"),
+ s_on.next(700, "qux"),
+ s_on.next(700, "bar"),
+ s_on.next(750, "baz"),
+ s_on.next(800, "qux"),
+ s_on.completed(850)
});
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
@@ -327,20 +327,20 @@ SCENARIO("flat_map source never ends", "[flat_map][map][operators]"){
const rxsc::test::messages<std::string> s_on;
auto xs = sc.make_cold_observable({
- i_on.on_next(100, 4),
- i_on.on_next(200, 2),
- i_on.on_next(300, 3),
- i_on.on_next(400, 1),
- i_on.on_next(500, 5),
- i_on.on_next(700, 0)
+ i_on.next(100, 4),
+ i_on.next(200, 2),
+ i_on.next(300, 3),
+ i_on.next(400, 1),
+ i_on.next(500, 5),
+ i_on.next(700, 0)
});
auto ys = sc.make_cold_observable({
- s_on.on_next(50, "foo"),
- s_on.on_next(100, "bar"),
- s_on.on_next(150, "baz"),
- s_on.on_next(200, "qux"),
- s_on.on_completed(250)
+ s_on.next(50, "foo"),
+ s_on.next(100, "bar"),
+ s_on.next(150, "baz"),
+ s_on.next(200, "qux"),
+ s_on.completed(250)
});
WHEN("each int is mapped to the strings"){
@@ -356,27 +356,27 @@ SCENARIO("flat_map source never ends", "[flat_map][map][operators]"){
THEN("the output contains strings repeated for each int"){
auto required = rxu::to_vector({
- s_on.on_next(350, "foo"),
- s_on.on_next(400, "bar"),
- s_on.on_next(450, "baz"),
- s_on.on_next(450, "foo"),
- s_on.on_next(500, "qux"),
- s_on.on_next(500, "bar"),
- s_on.on_next(550, "baz"),
- s_on.on_next(550, "foo"),
- s_on.on_next(600, "qux"),
- s_on.on_next(600, "bar"),
- s_on.on_next(650, "baz"),
- s_on.on_next(650, "foo"),
- s_on.on_next(700, "qux"),
- s_on.on_next(700, "bar"),
- s_on.on_next(750, "baz"),
- s_on.on_next(750, "foo"),
- s_on.on_next(800, "qux"),
- s_on.on_next(800, "bar"),
- s_on.on_next(850, "baz"),
- s_on.on_next(900, "qux"),
- s_on.on_next(950, "foo")
+ s_on.next(350, "foo"),
+ s_on.next(400, "bar"),
+ s_on.next(450, "baz"),
+ s_on.next(450, "foo"),
+ s_on.next(500, "qux"),
+ s_on.next(500, "bar"),
+ s_on.next(550, "baz"),
+ s_on.next(550, "foo"),
+ s_on.next(600, "qux"),
+ s_on.next(600, "bar"),
+ s_on.next(650, "baz"),
+ s_on.next(650, "foo"),
+ s_on.next(700, "qux"),
+ s_on.next(700, "bar"),
+ s_on.next(750, "baz"),
+ s_on.next(750, "foo"),
+ s_on.next(800, "qux"),
+ s_on.next(800, "bar"),
+ s_on.next(850, "baz"),
+ s_on.next(900, "qux"),
+ s_on.next(950, "foo")
});
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
@@ -414,21 +414,21 @@ SCENARIO("flat_map inner error", "[flat_map][map][operators]"){
const rxsc::test::messages<std::string> s_on;
auto xs = sc.make_cold_observable({
- i_on.on_next(100, 4),
- i_on.on_next(200, 2),
- i_on.on_next(300, 3),
- i_on.on_next(400, 1),
- i_on.on_completed(500)
+ i_on.next(100, 4),
+ i_on.next(200, 2),
+ i_on.next(300, 3),
+ i_on.next(400, 1),
+ i_on.completed(500)
});
std::runtime_error ex("filter on_error from inner source");
auto ys = sc.make_cold_observable({
- s_on.on_next(55, "foo"),
- s_on.on_next(104, "bar"),
- s_on.on_next(153, "baz"),
- s_on.on_next(202, "qux"),
- s_on.on_error(301, ex)
+ s_on.next(55, "foo"),
+ s_on.next(104, "bar"),
+ s_on.next(153, "baz"),
+ s_on.next(202, "qux"),
+ s_on.error(301, ex)
});
WHEN("each int is mapped to the strings"){
@@ -444,15 +444,15 @@ SCENARIO("flat_map inner error", "[flat_map][map][operators]"){
THEN("the output contains strings repeated for each int"){
auto required = rxu::to_vector({
- s_on.on_next(355, "foo"),
- s_on.on_next(404, "bar"),
- s_on.on_next(453, "baz"),
- s_on.on_next(455, "foo"),
- s_on.on_next(502, "qux"),
- s_on.on_next(504, "bar"),
- s_on.on_next(553, "baz"),
- s_on.on_next(555, "foo"),
- s_on.on_error(601, ex)
+ s_on.next(355, "foo"),
+ s_on.next(404, "bar"),
+ s_on.next(453, "baz"),
+ s_on.next(455, "foo"),
+ s_on.next(502, "qux"),
+ s_on.next(504, "bar"),
+ s_on.next(553, "baz"),
+ s_on.next(555, "foo"),
+ s_on.error(601, ex)
});
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
diff --git a/Rx/v2/test/operators/group_by.cpp b/Rx/v2/test/operators/group_by.cpp
index 1d85193..674c54a 100644
--- a/Rx/v2/test/operators/group_by.cpp
+++ b/Rx/v2/test/operators/group_by.cpp
@@ -166,25 +166,25 @@ SCENARIO("group_by", "[group_by][operators]"){
int marbleInvoked = 0;
auto xs = sc.make_hot_observable({
- on.on_next(90, "error"),
- on.on_next(110, "error"),
- on.on_next(130, "error"),
- on.on_next(220, " foo"),
- on.on_next(240, " FoO "),
- on.on_next(270, "baR "),
- on.on_next(310, "foO "),
- on.on_next(350, " Baz "),
- on.on_next(360, " qux "),
- on.on_next(390, " bar"),
- on.on_next(420, " BAR "),
- on.on_next(470, "FOO "),
- on.on_next(480, "baz "),
- on.on_next(510, " bAZ "),
- on.on_next(530, " fOo "),
- on.on_completed(570),
- on.on_next(580, "error"),
- on.on_completed(600),
- on.on_error(650, new std::runtime_error("error in completed sequence"))
+ on.next(90, "error"),
+ on.next(110, "error"),
+ on.next(130, "error"),
+ on.next(220, " foo"),
+ on.next(240, " FoO "),
+ on.next(270, "baR "),
+ on.next(310, "foO "),
+ on.next(350, " Baz "),
+ on.next(360, " qux "),
+ on.next(390, " bar"),
+ on.next(420, " BAR "),
+ on.next(470, "FOO "),
+ on.next(480, "baz "),
+ on.next(510, " bAZ "),
+ on.next(530, " fOo "),
+ on.completed(570),
+ on.next(580, "error"),
+ on.completed(600),
+ on.error(650, new std::runtime_error("error in completed sequence"))
});
WHEN("group each int with the next 2 ints"){
@@ -211,11 +211,11 @@ SCENARIO("group_by", "[group_by][operators]"){
THEN("the output contains groups of ints"){
auto required = rxu::to_vector({
- on.on_next(220, "foo"),
- on.on_next(270, "baR"),
- on.on_next(350, "Baz"),
- on.on_next(360, "qux"),
- on.on_completed(570)
+ on.next(220, "foo"),
+ on.next(270, "baR"),
+ on.next(350, "Baz"),
+ on.next(360, "qux"),
+ on.completed(570)
});
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
diff --git a/Rx/v2/test/operators/lift.cpp b/Rx/v2/test/operators/lift.cpp
index 0496019..0794178 100644
--- a/Rx/v2/test/operators/lift.cpp
+++ b/Rx/v2/test/operators/lift.cpp
@@ -101,18 +101,18 @@ SCENARIO("lift liftfilter stops on disposal", "[where][filter][lift][operators]"
long invoked = 0;
auto xs = sc.make_hot_observable({
- on.on_next(110, 1),
- on.on_next(180, 2),
- on.on_next(230, 3),
- on.on_next(270, 4),
- on.on_next(340, 5),
- on.on_next(380, 6),
- on.on_next(390, 7),
- on.on_next(450, 8),
- on.on_next(470, 9),
- on.on_next(560, 10),
- on.on_next(580, 11),
- on.on_completed(600)
+ on.next(110, 1),
+ on.next(180, 2),
+ on.next(230, 3),
+ on.next(270, 4),
+ on.next(340, 5),
+ on.next(380, 6),
+ on.next(390, 7),
+ on.next(450, 8),
+ on.next(470, 9),
+ on.next(560, 10),
+ on.next(580, 11),
+ on.completed(600)
});
WHEN("filtered to ints that are primes"){
@@ -132,9 +132,9 @@ SCENARIO("lift liftfilter stops on disposal", "[where][filter][lift][operators]"
THEN("the output only contains primes that arrived before disposal"){
auto required = rxu::to_vector({
- on.on_next(230, 3),
- on.on_next(340, 5),
- on.on_next(390, 7)
+ on.next(230, 3),
+ on.next(340, 5),
+ on.next(390, 7)
});
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
@@ -164,18 +164,18 @@ SCENARIO("stream lift liftfilter stops on disposal", "[where][filter][lift][stre
long invoked = 0;
auto xs = sc.make_hot_observable({
- on.on_next(110, 1),
- on.on_next(180, 2),
- on.on_next(230, 3),
- on.on_next(270, 4),
- on.on_next(340, 5),
- on.on_next(380, 6),
- on.on_next(390, 7),
- on.on_next(450, 8),
- on.on_next(470, 9),
- on.on_next(560, 10),
- on.on_next(580, 11),
- on.on_completed(600)
+ on.next(110, 1),
+ on.next(180, 2),
+ on.next(230, 3),
+ on.next(270, 4),
+ on.next(340, 5),
+ on.next(380, 6),
+ on.next(390, 7),
+ on.next(450, 8),
+ on.next(470, 9),
+ on.next(560, 10),
+ on.next(580, 11),
+ on.completed(600)
});
WHEN("filtered to ints that are primes"){
@@ -195,9 +195,9 @@ SCENARIO("stream lift liftfilter stops on disposal", "[where][filter][lift][stre
THEN("the output only contains primes that arrived before disposal"){
auto required = rxu::to_vector({
- on.on_next(230, 3),
- on.on_next(340, 5),
- on.on_next(390, 7)
+ on.next(230, 3),
+ on.next(340, 5),
+ on.next(390, 7)
});
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
@@ -227,18 +227,18 @@ SCENARIO("lift lambda filter stops on disposal", "[where][filter][lift][lambda][
long invoked = 0;
auto xs = sc.make_hot_observable({
- on.on_next(110, 1),
- on.on_next(180, 2),
- on.on_next(230, 3),
- on.on_next(270, 4),
- on.on_next(340, 5),
- on.on_next(380, 6),
- on.on_next(390, 7),
- on.on_next(450, 8),
- on.on_next(470, 9),
- on.on_next(560, 10),
- on.on_next(580, 11),
- on.on_completed(600)
+ on.next(110, 1),
+ on.next(180, 2),
+ on.next(230, 3),
+ on.next(270, 4),
+ on.next(340, 5),
+ on.next(380, 6),
+ on.next(390, 7),
+ on.next(450, 8),
+ on.next(470, 9),
+ on.next(560, 10),
+ on.next(580, 11),
+ on.completed(600)
});
WHEN("filtered to ints that are primes"){
@@ -271,9 +271,9 @@ SCENARIO("lift lambda filter stops on disposal", "[where][filter][lift][lambda][
THEN("the output only contains primes that arrived before disposal"){
auto required = rxu::to_vector({
- on.on_next(230, 3),
- on.on_next(340, 5),
- on.on_next(390, 7)
+ on.next(230, 3),
+ on.next(340, 5),
+ on.next(390, 7)
});
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
diff --git a/Rx/v2/test/operators/map.cpp b/Rx/v2/test/operators/map.cpp
index 4491511..aab227f 100644
--- a/Rx/v2/test/operators/map.cpp
+++ b/Rx/v2/test/operators/map.cpp
@@ -13,15 +13,15 @@ SCENARIO("map stops on completion", "[map][operators]"){
long invoked = 0;
auto xs = sc.make_hot_observable({
- on.on_next(180, 1),
- on.on_next(210, 2),
- on.on_next(240, 3),
- on.on_next(290, 4),
- on.on_next(350, 5),
- on.on_completed(400),
- on.on_next(410, -1),
- on.on_completed(420),
- on.on_error(430, std::runtime_error("error on unsubscribed stream"))
+ on.next(180, 1),
+ on.next(210, 2),
+ on.next(240, 3),
+ on.next(290, 4),
+ on.next(350, 5),
+ on.completed(400),
+ on.next(410, -1),
+ on.completed(420),
+ on.error(430, std::runtime_error("error on unsubscribed stream"))
});
WHEN("mapped to ints that are one larger"){
@@ -40,11 +40,11 @@ SCENARIO("map stops on completion", "[map][operators]"){
THEN("the output stops on completion"){
auto required = rxu::to_vector({
- on.on_next(210, 3),
- on.on_next(240, 4),
- on.on_next(290, 5),
- on.on_next(350, 6),
- on.on_completed(400)
+ on.next(210, 3),
+ on.next(240, 4),
+ on.next(290, 5),
+ on.next(350, 6),
+ on.completed(400)
});
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
diff --git a/Rx/v2/test/operators/merge.cpp b/Rx/v2/test/operators/merge.cpp
index a8a32ad..2b32838 100644
--- a/Rx/v2/test/operators/merge.cpp
+++ b/Rx/v2/test/operators/merge.cpp
@@ -102,37 +102,37 @@ SCENARIO("merge completes", "[merge][join][operators]"){
const rxsc::test::messages<rx::observable<int>> o_on;
auto ys1 = sc.make_cold_observable({
- on.on_next(10, 101),
- on.on_next(20, 102),
- on.on_next(110, 103),
- on.on_next(120, 104),
- on.on_next(210, 105),
- on.on_next(220, 106),
- on.on_completed(230)
+ on.next(10, 101),
+ on.next(20, 102),
+ on.next(110, 103),
+ on.next(120, 104),
+ on.next(210, 105),
+ on.next(220, 106),
+ on.completed(230)
});
auto ys2 = sc.make_cold_observable({
- on.on_next(10, 201),
- on.on_next(20, 202),
- on.on_next(30, 203),
- on.on_next(40, 204),
- on.on_completed(50)
+ on.next(10, 201),
+ on.next(20, 202),
+ on.next(30, 203),
+ on.next(40, 204),
+ on.completed(50)
});
auto ys3 = sc.make_cold_observable({
- on.on_next(10, 301),
- on.on_next(20, 302),
- on.on_next(30, 303),
- on.on_next(40, 304),
- on.on_next(120, 305),
- on.on_completed(150)
+ on.next(10, 301),
+ on.next(20, 302),
+ on.next(30, 303),
+ on.next(40, 304),
+ on.next(120, 305),
+ on.completed(150)
});
auto xs = sc.make_hot_observable({
- o_on.on_next(300, ys1),
- o_on.on_next(400, ys2),
- o_on.on_next(500, ys3),
- o_on.on_completed(600)
+ o_on.next(300, ys1),
+ o_on.next(400, ys2),
+ o_on.next(500, ys3),
+ o_on.completed(600)
});
WHEN("each int is merged"){
@@ -148,22 +148,22 @@ SCENARIO("merge completes", "[merge][join][operators]"){
THEN("the output contains merged ints"){
auto required = rxu::to_vector({
- on.on_next(310, 101),
- on.on_next(320, 102),
- on.on_next(410, 103),
- on.on_next(410, 201),
- on.on_next(420, 104),
- on.on_next(420, 202),
- on.on_next(430, 203),
- on.on_next(440, 204),
- on.on_next(510, 105),
- on.on_next(510, 301),
- on.on_next(520, 106),
- on.on_next(520, 302),
- on.on_next(530, 303),
- on.on_next(540, 304),
- on.on_next(620, 305),
- on.on_completed(650)
+ on.next(310, 101),
+ on.next(320, 102),
+ on.next(410, 103),
+ on.next(410, 201),
+ on.next(420, 104),
+ on.next(420, 202),
+ on.next(430, 203),
+ on.next(440, 204),
+ on.next(510, 105),
+ on.next(510, 301),
+ on.next(520, 106),
+ on.next(520, 302),
+ on.next(530, 303),
+ on.next(540, 304),
+ on.next(620, 305),
+ on.completed(650)
});
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
@@ -212,30 +212,30 @@ SCENARIO("variadic merge completes", "[merge][join][operators]"){
const rxsc::test::messages<rx::observable<int>> o_on;
auto ys1 = sc.make_cold_observable({
- on.on_next(10, 101),
- on.on_next(20, 102),
- on.on_next(110, 103),
- on.on_next(120, 104),
- on.on_next(210, 105),
- on.on_next(220, 106),
- on.on_completed(230)
+ on.next(10, 101),
+ on.next(20, 102),
+ on.next(110, 103),
+ on.next(120, 104),
+ on.next(210, 105),
+ on.next(220, 106),
+ on.completed(230)
});
auto ys2 = sc.make_cold_observable({
- on.on_next(10, 201),
- on.on_next(20, 202),
- on.on_next(30, 203),
- on.on_next(40, 204),
- on.on_completed(50)
+ on.next(10, 201),
+ on.next(20, 202),
+ on.next(30, 203),
+ on.next(40, 204),
+ on.completed(50)
});
auto ys3 = sc.make_cold_observable({
- on.on_next(10, 301),
- on.on_next(20, 302),
- on.on_next(30, 303),
- on.on_next(40, 304),
- on.on_next(120, 305),
- on.on_completed(150)
+ on.next(10, 301),
+ on.next(20, 302),
+ on.next(30, 303),
+ on.next(40, 304),
+ on.next(120, 305),
+ on.completed(150)
});
WHEN("each int is merged"){
@@ -249,22 +249,22 @@ SCENARIO("variadic merge completes", "[merge][join][operators]"){
THEN("the output contains merged ints"){
auto required = rxu::to_vector({
- on.on_next(210, 101),
- on.on_next(210, 201),
- on.on_next(210, 301),
- on.on_next(220, 102),
- on.on_next(220, 202),
- on.on_next(220, 302),
- on.on_next(230, 203),
- on.on_next(230, 303),
- on.on_next(240, 204),
- on.on_next(240, 304),
- on.on_next(310, 103),
- on.on_next(320, 104),
- on.on_next(320, 305),
- on.on_next(410, 105),
- on.on_next(420, 106),
- on.on_completed(430)
+ on.next(210, 101),
+ on.next(210, 201),
+ on.next(210, 301),
+ on.next(220, 102),
+ on.next(220, 202),
+ on.next(220, 302),
+ on.next(230, 203),
+ on.next(230, 303),
+ on.next(240, 204),
+ on.next(240, 304),
+ on.next(310, 103),
+ on.next(320, 104),
+ on.next(320, 305),
+ on.next(410, 105),
+ on.next(420, 106),
+ on.completed(430)
});
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
diff --git a/Rx/v2/test/operators/publish.cpp b/Rx/v2/test/operators/publish.cpp
index 5972ac2..27bc574 100644
--- a/Rx/v2/test/operators/publish.cpp
+++ b/Rx/v2/test/operators/publish.cpp
@@ -49,20 +49,20 @@ SCENARIO("publish basic", "[publish][multicast][subject][operators]"){
const rxsc::test::messages<int> on;
auto xs = sc.make_hot_observable({
- on.on_next(110, 7),
- on.on_next(220, 3),
- on.on_next(280, 4),
- on.on_next(290, 1),
- on.on_next(340, 8),
- on.on_next(360, 5),
- on.on_next(370, 6),
- on.on_next(390, 7),
- on.on_next(410, 13),
- on.on_next(430, 2),
- on.on_next(450, 9),
- on.on_next(520, 11),
- on.on_next(560, 20),
- on.on_completed(600)
+ on.next(110, 7),
+ on.next(220, 3),
+ on.next(280, 4),
+ on.next(290, 1),
+ on.next(340, 8),
+ on.next(360, 5),
+ on.next(370, 6),
+ on.next(390, 7),
+ on.next(410, 13),
+ on.next(430, 2),
+ on.next(450, 9),
+ on.next(520, 11),
+ on.next(560, 20),
+ on.completed(600)
});
auto res = w.make_subscriber<int>();
@@ -130,11 +130,11 @@ SCENARIO("publish basic", "[publish][multicast][subject][operators]"){
THEN("the output only contains items sent while subscribed"){
auto required = rxu::to_vector({
- on.on_next(340, 8),
- on.on_next(360, 5),
- on.on_next(370, 6),
- on.on_next(390, 7),
- on.on_next(520, 11)
+ on.next(340, 8),
+ on.next(360, 5),
+ on.next(370, 6),
+ on.next(390, 7),
+ on.next(520, 11)
});
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
@@ -164,20 +164,20 @@ SCENARIO("publish error", "[publish][error][multicast][subject][operators]"){
std::runtime_error ex("publish on_error");
auto xs = sc.make_hot_observable({
- on.on_next(110, 7),
- on.on_next(220, 3),
- on.on_next(280, 4),
- on.on_next(290, 1),
- on.on_next(340, 8),
- on.on_next(360, 5),
- on.on_next(370, 6),
- on.on_next(390, 7),
- on.on_next(410, 13),
- on.on_next(430, 2),
- on.on_next(450, 9),
- on.on_next(520, 11),
- on.on_next(560, 20),
- on.on_error(600, ex)
+ on.next(110, 7),
+ on.next(220, 3),
+ on.next(280, 4),
+ on.next(290, 1),
+ on.next(340, 8),
+ on.next(360, 5),
+ on.next(370, 6),
+ on.next(390, 7),
+ on.next(410, 13),
+ on.next(430, 2),
+ on.next(450, 9),
+ on.next(520, 11),
+ on.next(560, 20),
+ on.error(600, ex)
});
auto res = w.make_subscriber<int>();
@@ -231,13 +231,13 @@ SCENARIO("publish error", "[publish][error][multicast][subject][operators]"){
THEN("the output only contains items sent while subscribed"){
auto required = rxu::to_vector({
- on.on_next(340, 8),
- on.on_next(360, 5),
- on.on_next(370, 6),
- on.on_next(390, 7),
- on.on_next(520, 11),
- on.on_next(560, 20),
- on.on_error(600, ex)
+ on.next(340, 8),
+ on.next(360, 5),
+ on.next(370, 6),
+ on.next(390, 7),
+ on.next(520, 11),
+ on.next(560, 20),
+ on.error(600, ex)
});
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
@@ -263,20 +263,20 @@ SCENARIO("publish basic with initial value", "[publish][multicast][behavior][ope
const rxsc::test::messages<int> on;
auto xs = sc.make_hot_observable({
- on.on_next(110, 7),
- on.on_next(220, 3),
- on.on_next(280, 4),
- on.on_next(290, 1),
- on.on_next(340, 8),
- on.on_next(360, 5),
- on.on_next(370, 6),
- on.on_next(390, 7),
- on.on_next(410, 13),
- on.on_next(430, 2),
- on.on_next(450, 9),
- on.on_next(520, 11),
- on.on_next(560, 20),
- on.on_completed(600)
+ on.next(110, 7),
+ on.next(220, 3),
+ on.next(280, 4),
+ on.next(290, 1),
+ on.next(340, 8),
+ on.next(360, 5),
+ on.next(370, 6),
+ on.next(390, 7),
+ on.next(410, 13),
+ on.next(430, 2),
+ on.next(450, 9),
+ on.next(520, 11),
+ on.next(560, 20),
+ on.completed(600)
});
auto res = w.make_subscriber<int>();
@@ -343,12 +343,12 @@ SCENARIO("publish basic with initial value", "[publish][multicast][behavior][ope
THEN("the output only contains items sent while subscribed"){
auto required = rxu::to_vector({
- on.on_next(200, 1979),
- on.on_next(340, 8),
- on.on_next(360, 5),
- on.on_next(370, 6),
- on.on_next(390, 7),
- on.on_next(520, 11)
+ on.next(200, 1979),
+ on.next(340, 8),
+ on.next(360, 5),
+ on.next(370, 6),
+ on.next(390, 7),
+ on.next(520, 11)
});
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
diff --git a/Rx/v2/test/operators/reduce.cpp b/Rx/v2/test/operators/reduce.cpp
index 4872ca5..8a552e3 100644
--- a/Rx/v2/test/operators/reduce.cpp
+++ b/Rx/v2/test/operators/reduce.cpp
@@ -14,13 +14,13 @@ SCENARIO("reduce some data with seed", "[reduce][operators]"){
int seed = 42;
auto xs = sc.make_hot_observable({
- on.on_next(150, 1),
- on.on_next(210, 0),
- on.on_next(220, 1),
- on.on_next(230, 2),
- on.on_next(240, 3),
- on.on_next(250, 4),
- on.on_completed(260)
+ on.next(150, 1),
+ on.next(210, 0),
+ on.next(220, 1),
+ on.next(230, 2),
+ on.next(240, 3),
+ on.next(250, 4),
+ on.completed(260)
});
auto sum = xs.sum();
@@ -44,8 +44,8 @@ SCENARIO("reduce some data with seed", "[reduce][operators]"){
THEN("the output stops on completion"){
auto required = rxu::to_vector({
- on.on_next(260, (seed + 0 + 1 + 2 + 3 + 4) * 5),
- on.on_completed(260)
+ on.next(260, (seed + 0 + 1 + 2 + 3 + 4) * 5),
+ on.completed(260)
});
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
@@ -70,11 +70,11 @@ SCENARIO("average some data", "[reduce][average][operators]"){
const rxsc::test::messages<double> d_on;
auto xs = sc.make_hot_observable({
- on.on_next(150, 1),
- on.on_next(210, 3),
- on.on_next(220, 4),
- on.on_next(230, 2),
- on.on_completed(250)
+ on.next(150, 1),
+ on.next(210, 3),
+ on.next(220, 4),
+ on.next(230, 2),
+ on.completed(250)
});
WHEN("mapped to ints that are one larger"){
@@ -87,8 +87,8 @@ SCENARIO("average some data", "[reduce][average][operators]"){
THEN("the output stops on completion"){
auto required = rxu::to_vector({
- d_on.on_next(250, 3.0),
- d_on.on_completed(250)
+ d_on.next(250, 3.0),
+ d_on.completed(250)
});
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
diff --git a/Rx/v2/test/operators/repeat.cpp b/Rx/v2/test/operators/repeat.cpp
index 10361ea..cf91a37 100644
--- a/Rx/v2/test/operators/repeat.cpp
+++ b/Rx/v2/test/operators/repeat.cpp
@@ -12,10 +12,10 @@ SCENARIO("repeat, basic test", "[repeat][operators]"){
const rxsc::test::messages<int> on;
auto xs = sc.make_cold_observable({
- on.on_next(100, 1),
- on.on_next(150, 2),
- on.on_next(200, 3),
- on.on_completed(250)
+ on.next(100, 1),
+ on.next(150, 2),
+ on.next(200, 3),
+ on.completed(250)
});
WHEN("infinite repeat is launched"){
@@ -31,15 +31,15 @@ SCENARIO("repeat, basic test", "[repeat][operators]"){
THEN("the output contains 3 sets of ints"){
auto required = rxu::to_vector({
- on.on_next(300, 1),
- on.on_next(350, 2),
- on.on_next(400, 3),
- on.on_next(550, 1),
- on.on_next(600, 2),
- on.on_next(650, 3),
- on.on_next(800, 1),
- on.on_next(850, 2),
- on.on_next(900, 3)
+ on.next(300, 1),
+ on.next(350, 2),
+ on.next(400, 3),
+ on.next(550, 1),
+ on.next(600, 2),
+ on.next(650, 3),
+ on.next(800, 1),
+ on.next(850, 2),
+ on.next(900, 3)
});
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
@@ -66,9 +66,9 @@ SCENARIO("repeat, infinite observable test", "[repeat][operators]"){
const rxsc::test::messages<int> on;
auto xs = sc.make_cold_observable({
- on.on_next(100, 1),
- on.on_next(150, 2),
- on.on_next(200, 3)
+ on.next(100, 1),
+ on.next(150, 2),
+ on.next(200, 3)
});
WHEN("infinite repeat is launched"){
@@ -84,9 +84,9 @@ SCENARIO("repeat, infinite observable test", "[repeat][operators]"){
THEN("the output contains a set of ints"){
auto required = rxu::to_vector({
- on.on_next(300, 1),
- on.on_next(350, 2),
- on.on_next(400, 3)
+ on.next(300, 1),
+ on.next(350, 2),
+ on.next(400, 3)
});
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
@@ -112,10 +112,10 @@ SCENARIO("repeat, error test", "[repeat][operators]"){
std::runtime_error ex("repeat on_error from source");
auto xs = sc.make_cold_observable({
- on.on_next(100, 1),
- on.on_next(150, 2),
- on.on_next(200, 3),
- on.on_error(250, ex)
+ on.next(100, 1),
+ on.next(150, 2),
+ on.next(200, 3),
+ on.error(250, ex)
});
WHEN("infinite repeat is launched"){
@@ -131,10 +131,10 @@ SCENARIO("repeat, error test", "[repeat][operators]"){
THEN("the output contains a set of ints and an error"){
auto required = rxu::to_vector({
- on.on_next(300, 1),
- on.on_next(350, 2),
- on.on_next(400, 3),
- on.on_error(450, ex)
+ on.next(300, 1),
+ on.next(350, 2),
+ on.next(400, 3),
+ on.error(450, ex)
});
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
@@ -158,10 +158,10 @@ SCENARIO("countable repeat, basic test", "[repeat][operators]"){
const rxsc::test::messages<int> on;
auto xs = sc.make_cold_observable({
- on.on_next(5, 1),
- on.on_next(10, 2),
- on.on_next(15, 3),
- on.on_completed(20)
+ on.next(5, 1),
+ on.next(10, 2),
+ on.next(15, 3),
+ on.completed(20)
});
WHEN("repeat of 3 iterations is launched"){
@@ -177,16 +177,16 @@ SCENARIO("countable repeat, basic test", "[repeat][operators]"){
THEN("the output contains 3 sets of ints"){
auto required = rxu::to_vector({
- on.on_next(205, 1),
- on.on_next(210, 2),
- on.on_next(215, 3),
- on.on_next(225, 1),
- on.on_next(230, 2),
- on.on_next(235, 3),
- on.on_next(245, 1),
- on.on_next(250, 2),
- on.on_next(255, 3),
- on.on_completed(260)
+ on.next(205, 1),
+ on.next(210, 2),
+ on.next(215, 3),
+ on.next(225, 1),
+ on.next(230, 2),
+ on.next(235, 3),
+ on.next(245, 1),
+ on.next(250, 2),
+ on.next(255, 3),
+ on.completed(260)
});
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
@@ -212,10 +212,10 @@ SCENARIO("countable repeat, dispose test", "[repeat][operators]"){
const rxsc::test::messages<int> on;
auto xs = sc.make_cold_observable({
- on.on_next(5, 1),
- on.on_next(10, 2),
- on.on_next(15, 3),
- on.on_completed(20)
+ on.next(5, 1),
+ on.next(10, 2),
+ on.next(15, 3),
+ on.completed(20)
});
WHEN("repeat of 3 iterations is launched"){
@@ -232,11 +232,11 @@ SCENARIO("countable repeat, dispose test", "[repeat][operators]"){
THEN("the output contains less than 2 full sets of ints"){
auto required = rxu::to_vector({
- on.on_next(205, 1),
- on.on_next(210, 2),
- on.on_next(215, 3),
- on.on_next(225, 1),
- on.on_next(230, 2),
+ on.next(205, 1),
+ on.next(210, 2),
+ on.next(215, 3),
+ on.next(225, 1),
+ on.next(230, 2),
});
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
@@ -261,9 +261,9 @@ SCENARIO("countable repeat, infinite observable test", "[repeat][operators]"){
const rxsc::test::messages<int> on;
auto xs = sc.make_cold_observable({
- on.on_next(100, 1),
- on.on_next(150, 2),
- on.on_next(200, 3)
+ on.next(100, 1),
+ on.next(150, 2),
+ on.next(200, 3)
});
WHEN("infinite repeat is launched"){
@@ -279,9 +279,9 @@ SCENARIO("countable repeat, infinite observable test", "[repeat][operators]"){
THEN("the output contains a set of ints"){
auto required = rxu::to_vector({
- on.on_next(300, 1),
- on.on_next(350, 2),
- on.on_next(400, 3)
+ on.next(300, 1),
+ on.next(350, 2),
+ on.next(400, 3)
});
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
@@ -307,10 +307,10 @@ SCENARIO("countable repeat, error test", "[repeat][operators]"){
std::runtime_error ex("repeat on_error from source");
auto xs = sc.make_cold_observable({
- on.on_next(100, 1),
- on.on_next(150, 2),
- on.on_next(200, 3),
- on.on_error(250, ex)
+ on.next(100, 1),
+ on.next(150, 2),
+ on.next(200, 3),
+ on.error(250, ex)
});
WHEN("infinite repeat is launched"){
@@ -326,10 +326,10 @@ SCENARIO("countable repeat, error test", "[repeat][operators]"){
THEN("the output contains a set of ints and an error"){
auto required = rxu::to_vector({
- on.on_next(300, 1),
- on.on_next(350, 2),
- on.on_next(400, 3),
- on.on_error(450, ex)
+ on.next(300, 1),
+ on.next(350, 2),
+ on.next(400, 3),
+ on.error(450, ex)
});
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
diff --git a/Rx/v2/test/operators/scan.cpp b/Rx/v2/test/operators/scan.cpp
index 58ec27e..9d60d11 100644
--- a/Rx/v2/test/operators/scan.cpp
+++ b/Rx/v2/test/operators/scan.cpp
@@ -14,7 +14,7 @@ SCENARIO("scan: seed, never", "[scan][operators]"){
int seed = 1;
auto xs = sc.make_hot_observable({
- on.on_next(150, 1),
+ on.next(150, 1),
});
WHEN("mapped to ints that are one larger"){
@@ -56,8 +56,8 @@ SCENARIO("scan: seed, empty", "[scan][operators]"){
int seed = 1;
auto xs = sc.make_hot_observable({
- on.on_next(150, 1),
- on.on_completed(250)
+ on.next(150, 1),
+ on.completed(250)
});
WHEN("mapped to ints that are one larger"){
@@ -75,7 +75,7 @@ SCENARIO("scan: seed, empty", "[scan][operators]"){
THEN("the output stops on completion"){
auto required = rxu::to_vector({
- on.on_completed(250)
+ on.completed(250)
});
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
@@ -101,9 +101,9 @@ SCENARIO("scan: seed, return", "[scan][operators]"){
int seed = 1;
auto xs = sc.make_hot_observable({
- on.on_next(150, 1),
- on.on_next(220, 2),
- on.on_completed(250)
+ on.next(150, 1),
+ on.next(220, 2),
+ on.completed(250)
});
WHEN("mapped to ints that are one larger"){
@@ -121,8 +121,8 @@ SCENARIO("scan: seed, return", "[scan][operators]"){
THEN("the output stops on completion"){
auto required = rxu::to_vector({
- on.on_next(220, seed + 2),
- on.on_completed(250)
+ on.next(220, seed + 2),
+ on.completed(250)
});
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
@@ -150,8 +150,8 @@ SCENARIO("scan: seed, throw", "[scan][operators]"){
std::runtime_error ex("scan on_error from source");
auto xs = sc.make_hot_observable({
- on.on_next(150, 1),
- on.on_error(250, ex)
+ on.next(150, 1),
+ on.error(250, ex)
});
WHEN("mapped to ints that are one larger"){
@@ -169,7 +169,7 @@ SCENARIO("scan: seed, throw", "[scan][operators]"){
THEN("the output stops on error"){
auto required = rxu::to_vector({
- on.on_error(250, ex)
+ on.error(250, ex)
});
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
@@ -195,12 +195,12 @@ SCENARIO("scan: seed, some data", "[scan][operators]"){
int seed = 1;
auto xs = sc.make_hot_observable({
- on.on_next(150, 1),
- on.on_next(210, 2),
- on.on_next(220, 3),
- on.on_next(230, 4),
- on.on_next(240, 5),
- on.on_completed(250)
+ on.next(150, 1),
+ on.next(210, 2),
+ on.next(220, 3),
+ on.next(230, 4),
+ on.next(240, 5),
+ on.completed(250)
});
WHEN("mapped to ints that are one larger"){
@@ -218,11 +218,11 @@ SCENARIO("scan: seed, some data", "[scan][operators]"){
THEN("the output stops on completion"){
auto required = rxu::to_vector({
- on.on_next(210, seed + 2),
- on.on_next(220, seed + 2 + 3),
- on.on_next(230, seed + 2 + 3 + 4),
- on.on_next(240, seed + 2 + 3 + 4 + 5),
- on.on_completed(250)
+ on.next(210, seed + 2),
+ on.next(220, seed + 2 + 3),
+ on.next(230, seed + 2 + 3 + 4),
+ on.next(240, seed + 2 + 3 + 4 + 5),
+ on.completed(250)
});
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
@@ -250,12 +250,12 @@ SCENARIO("scan: seed, accumulator throws", "[scan][operators]"){
std::runtime_error ex("scan on_error from source");
auto xs = sc.make_hot_observable({
- on.on_next(150, 1),
- on.on_next(210, 2),
- on.on_next(220, 3),
- on.on_next(230, 4),
- on.on_next(240, 5),
- on.on_completed(250)
+ on.next(150, 1),
+ on.next(210, 2),
+ on.next(220, 3),
+ on.next(230, 4),
+ on.next(240, 5),
+ on.completed(250)
});
WHEN("mapped to ints that are one larger"){
@@ -276,9 +276,9 @@ SCENARIO("scan: seed, accumulator throws", "[scan][operators]"){
THEN("the output stops on error"){
auto required = rxu::to_vector({
- on.on_next(210, seed + 2),
- on.on_next(220, seed + 2 + 3),
- on.on_error(230, ex)
+ on.next(210, seed + 2),
+ on.next(220, seed + 2 + 3),
+ on.error(230, ex)
});
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
diff --git a/Rx/v2/test/operators/skip.cpp b/Rx/v2/test/operators/skip.cpp
index 72ede48..2596e74 100644
--- a/Rx/v2/test/operators/skip.cpp
+++ b/Rx/v2/test/operators/skip.cpp
@@ -12,26 +12,26 @@ SCENARIO("skip, complete after", "[skip][operators]"){
const rxsc::test::messages<int> on;
auto xs = sc.make_hot_observable({
- on.on_next(70, 6),
- on.on_next(150, 4),
- on.on_next(210, 9),
- on.on_next(230, 13),
- on.on_next(270, 7),
- on.on_next(280, 1),
- on.on_next(300, -1),
- on.on_next(310, 3),
- on.on_next(340, 8),
- on.on_next(370, 11),
- on.on_next(410, 15),
- on.on_next(415, 16),
- on.on_next(460, 72),
- on.on_next(510, 76),
- on.on_next(560, 32),
- on.on_next(570, -100),
- on.on_next(580, -3),
- on.on_next(590, 5),
- on.on_next(630, 10),
- on.on_completed(690)
+ on.next(70, 6),
+ on.next(150, 4),
+ on.next(210, 9),
+ on.next(230, 13),
+ on.next(270, 7),
+ on.next(280, 1),
+ on.next(300, -1),
+ on.next(310, 3),
+ on.next(340, 8),
+ on.next(370, 11),
+ on.next(410, 15),
+ on.next(415, 16),
+ on.next(460, 72),
+ on.next(510, 76),
+ on.next(560, 32),
+ on.next(570, -100),
+ on.next(580, -3),
+ on.next(590, 5),
+ on.next(630, 10),
+ on.completed(690)
});
WHEN("more values than generated are skipped"){
@@ -47,7 +47,7 @@ SCENARIO("skip, complete after", "[skip][operators]"){
THEN("the output only contains only complete message"){
auto required = rxu::to_vector({
- on.on_completed(690)
+ on.completed(690)
});
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
@@ -71,26 +71,26 @@ SCENARIO("skip, complete same", "[skip][operators]"){
const rxsc::test::messages<int> on;
auto xs = sc.make_hot_observable({
- on.on_next(70, 6),
- on.on_next(150, 4),
- on.on_next(210, 9),
- on.on_next(230, 13),
- on.on_next(270, 7),
- on.on_next(280, 1),
- on.on_next(300, -1),
- on.on_next(310, 3),
- on.on_next(340, 8),
- on.on_next(370, 11),
- on.on_next(410, 15),
- on.on_next(415, 16),
- on.on_next(460, 72),
- on.on_next(510, 76),
- on.on_next(560, 32),
- on.on_next(570, -100),
- on.on_next(580, -3),
- on.on_next(590, 5),
- on.on_next(630, 10),
- on.on_completed(690)
+ on.next(70, 6),
+ on.next(150, 4),
+ on.next(210, 9),
+ on.next(230, 13),
+ on.next(270, 7),
+ on.next(280, 1),
+ on.next(300, -1),
+ on.next(310, 3),
+ on.next(340, 8),
+ on.next(370, 11),
+ on.next(410, 15),
+ on.next(415, 16),
+ on.next(460, 72),
+ on.next(510, 76),
+ on.next(560, 32),
+ on.next(570, -100),
+ on.next(580, -3),
+ on.next(590, 5),
+ on.next(630, 10),
+ on.completed(690)
});
WHEN("exact number of values is skipped"){
@@ -106,7 +106,7 @@ SCENARIO("skip, complete same", "[skip][operators]"){
THEN("the output only contains only complete message"){
auto required = rxu::to_vector({
- on.on_completed(690)
+ on.completed(690)
});
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
@@ -130,26 +130,26 @@ SCENARIO("skip, complete before", "[skip][operators]"){
const rxsc::test::messages<int> on;
auto xs = sc.make_hot_observable({
- on.on_next(70, 6),
- on.on_next(150, 4),
- on.on_next(210, 9),
- on.on_next(230, 13),
- on.on_next(270, 7),
- on.on_next(280, 1),
- on.on_next(300, -1),
- on.on_next(310, 3),
- on.on_next(340, 8),
- on.on_next(370, 11),
- on.on_next(410, 15),
- on.on_next(415, 16),
- on.on_next(460, 72),
- on.on_next(510, 76),
- on.on_next(560, 32),
- on.on_next(570, -100),
- on.on_next(580, -3),
- on.on_next(590, 5),
- on.on_next(630, 10),
- on.on_completed(690)
+ on.next(70, 6),
+ on.next(150, 4),
+ on.next(210, 9),
+ on.next(230, 13),
+ on.next(270, 7),
+ on.next(280, 1),
+ on.next(300, -1),
+ on.next(310, 3),
+ on.next(340, 8),
+ on.next(370, 11),
+ on.next(410, 15),
+ on.next(415, 16),
+ on.next(460, 72),
+ on.next(510, 76),
+ on.next(560, 32),
+ on.next(570, -100),
+ on.next(580, -3),
+ on.next(590, 5),
+ on.next(630, 10),
+ on.completed(690)
});
WHEN("part of values is skipped"){
@@ -165,14 +165,14 @@ SCENARIO("skip, complete before", "[skip][operators]"){
THEN("the output only contains items sent while subscribed"){
auto required = rxu::to_vector({
- on.on_next(460, 72),
- on.on_next(510, 76),
- on.on_next(560, 32),
- on.on_next(570, -100),
- on.on_next(580, -3),
- on.on_next(590, 5),
- on.on_next(630, 10),
- on.on_completed(690)
+ on.next(460, 72),
+ on.next(510, 76),
+ on.next(560, 32),
+ on.next(570, -100),
+ on.next(580, -3),
+ on.next(590, 5),
+ on.next(630, 10),
+ on.completed(690)
});
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
@@ -196,26 +196,26 @@ SCENARIO("skip, complete zero", "[skip][operators]"){
const rxsc::test::messages<int> on;
auto xs = sc.make_hot_observable({
- on.on_next(70, 6),
- on.on_next(150, 4),
- on.on_next(210, 9),
- on.on_next(230, 13),
- on.on_next(270, 7),
- on.on_next(280, 1),
- on.on_next(300, -1),
- on.on_next(310, 3),
- on.on_next(340, 8),
- on.on_next(370, 11),
- on.on_next(410, 15),
- on.on_next(415, 16),
- on.on_next(460, 72),
- on.on_next(510, 76),
- on.on_next(560, 32),
- on.on_next(570, -100),
- on.on_next(580, -3),
- on.on_next(590, 5),
- on.on_next(630, 10),
- on.on_completed(690)
+ on.next(70, 6),
+ on.next(150, 4),
+ on.next(210, 9),
+ on.next(230, 13),
+ on.next(270, 7),
+ on.next(280, 1),
+ on.next(300, -1),
+ on.next(310, 3),
+ on.next(340, 8),
+ on.next(370, 11),
+ on.next(410, 15),
+ on.next(415, 16),
+ on.next(460, 72),
+ on.next(510, 76),
+ on.next(560, 32),
+ on.next(570, -100),
+ on.next(580, -3),
+ on.next(590, 5),
+ on.next(630, 10),
+ on.completed(690)
});
WHEN("no values are skipped"){
@@ -231,24 +231,24 @@ SCENARIO("skip, complete zero", "[skip][operators]"){
THEN("the output only contains items sent while subscribed"){
auto required = rxu::to_vector({
- on.on_next(210, 9),
- on.on_next(230, 13),
- on.on_next(270, 7),
- on.on_next(280, 1),
- on.on_next(300, -1),
- on.on_next(310, 3),
- on.on_next(340, 8),
- on.on_next(370, 11),
- on.on_next(410, 15),
- on.on_next(415, 16),
- on.on_next(460, 72),
- on.on_next(510, 76),
- on.on_next(560, 32),
- on.on_next(570, -100),
- on.on_next(580, -3),
- on.on_next(590, 5),
- on.on_next(630, 10),
- on.on_completed(690)
+ on.next(210, 9),
+ on.next(230, 13),
+ on.next(270, 7),
+ on.next(280, 1),
+ on.next(300, -1),
+ on.next(310, 3),
+ on.next(340, 8),
+ on.next(370, 11),
+ on.next(410, 15),
+ on.next(415, 16),
+ on.next(460, 72),
+ on.next(510, 76),
+ on.next(560, 32),
+ on.next(570, -100),
+ on.next(580, -3),
+ on.next(590, 5),
+ on.next(630, 10),
+ on.completed(690)
});
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
@@ -274,26 +274,26 @@ SCENARIO("skip, error after", "[skip][operators]"){
std::runtime_error ex("skip on_error from source");
auto xs = sc.make_hot_observable({
- on.on_next(70, 6),
- on.on_next(150, 4),
- on.on_next(210, 9),
- on.on_next(230, 13),
- on.on_next(270, 7),
- on.on_next(280, 1),
- on.on_next(300, -1),
- on.on_next(310, 3),
- on.on_next(340, 8),
- on.on_next(370, 11),
- on.on_next(410, 15),
- on.on_next(415, 16),
- on.on_next(460, 72),
- on.on_next(510, 76),
- on.on_next(560, 32),
- on.on_next(570, -100),
- on.on_next(580, -3),
- on.on_next(590, 5),
- on.on_next(630, 10),
- on.on_error(690, ex)
+ on.next(70, 6),
+ on.next(150, 4),
+ on.next(210, 9),
+ on.next(230, 13),
+ on.next(270, 7),
+ on.next(280, 1),
+ on.next(300, -1),
+ on.next(310, 3),
+ on.next(340, 8),
+ on.next(370, 11),
+ on.next(410, 15),
+ on.next(415, 16),
+ on.next(460, 72),
+ on.next(510, 76),
+ on.next(560, 32),
+ on.next(570, -100),
+ on.next(580, -3),
+ on.next(590, 5),
+ on.next(630, 10),
+ on.error(690, ex)
});
WHEN("more values than generated are skipped"){
@@ -309,7 +309,7 @@ SCENARIO("skip, error after", "[skip][operators]"){
THEN("the output only contains only error message"){
auto required = rxu::to_vector({
- on.on_error(690, ex)
+ on.error(690, ex)
});
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
@@ -335,26 +335,26 @@ SCENARIO("skip, error same", "[skip][operators]"){
std::runtime_error ex("skip on_error from source");
auto xs = sc.make_hot_observable({
- on.on_next(70, 6),
- on.on_next(150, 4),
- on.on_next(210, 9),
- on.on_next(230, 13),
- on.on_next(270, 7),
- on.on_next(280, 1),
- on.on_next(300, -1),
- on.on_next(310, 3),
- on.on_next(340, 8),
- on.on_next(370, 11),
- on.on_next(410, 15),
- on.on_next(415, 16),
- on.on_next(460, 72),
- on.on_next(510, 76),
- on.on_next(560, 32),
- on.on_next(570, -100),
- on.on_next(580, -3),
- on.on_next(590, 5),
- on.on_next(630, 10),
- on.on_error(690, ex)
+ on.next(70, 6),
+ on.next(150, 4),
+ on.next(210, 9),
+ on.next(230, 13),
+ on.next(270, 7),
+ on.next(280, 1),
+ on.next(300, -1),
+ on.next(310, 3),
+ on.next(340, 8),
+ on.next(370, 11),
+ on.next(410, 15),
+ on.next(415, 16),
+ on.next(460, 72),
+ on.next(510, 76),
+ on.next(560, 32),
+ on.next(570, -100),
+ on.next(580, -3),
+ on.next(590, 5),
+ on.next(630, 10),
+ on.error(690, ex)
});
WHEN("exact number of values is skipped"){
@@ -370,7 +370,7 @@ SCENARIO("skip, error same", "[skip][operators]"){
THEN("the output only contains only error message"){
auto required = rxu::to_vector({
- on.on_error(690, ex)
+ on.error(690, ex)
});
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
@@ -396,26 +396,26 @@ SCENARIO("skip, error before", "[skip][operators]"){
std::runtime_error ex("skip on_error from source");
auto xs = sc.make_hot_observable({
- on.on_next(70, 6),
- on.on_next(150, 4),
- on.on_next(210, 9),
- on.on_next(230, 13),
- on.on_next(270, 7),
- on.on_next(280, 1),
- on.on_next(300, -1),
- on.on_next(310, 3),
- on.on_next(340, 8),
- on.on_next(370, 11),
- on.on_next(410, 15),
- on.on_next(415, 16),
- on.on_next(460, 72),
- on.on_next(510, 76),
- on.on_next(560, 32),
- on.on_next(570, -100),
- on.on_next(580, -3),
- on.on_next(590, 5),
- on.on_next(630, 10),
- on.on_error(690, ex)
+ on.next(70, 6),
+ on.next(150, 4),
+ on.next(210, 9),
+ on.next(230, 13),
+ on.next(270, 7),
+ on.next(280, 1),
+ on.next(300, -1),
+ on.next(310, 3),
+ on.next(340, 8),
+ on.next(370, 11),
+ on.next(410, 15),
+ on.next(415, 16),
+ on.next(460, 72),
+ on.next(510, 76),
+ on.next(560, 32),
+ on.next(570, -100),
+ on.next(580, -3),
+ on.next(590, 5),
+ on.next(630, 10),
+ on.error(690, ex)
});
WHEN("part of values is skipped"){
@@ -431,21 +431,21 @@ SCENARIO("skip, error before", "[skip][operators]"){
THEN("the output only contains items sent while subscribed"){
auto required = rxu::to_vector({
- on.on_next(280, 1),
- on.on_next(300, -1),
- on.on_next(310, 3),
- on.on_next(340, 8),
- on.on_next(370, 11),
- on.on_next(410, 15),
- on.on_next(415, 16),
- on.on_next(460, 72),
- on.on_next(510, 76),
- on.on_next(560, 32),
- on.on_next(570, -100),
- on.on_next(580, -3),
- on.on_next(590, 5),
- on.on_next(630, 10),
- on.on_error(690, ex)
+ on.next(280, 1),
+ on.next(300, -1),
+ on.next(310, 3),
+ on.next(340, 8),
+ on.next(370, 11),
+ on.next(410, 15),
+ on.next(415, 16),
+ on.next(460, 72),
+ on.next(510, 76),
+ on.next(560, 32),
+ on.next(570, -100),
+ on.next(580, -3),
+ on.next(590, 5),
+ on.next(630, 10),
+ on.error(690, ex)
});
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
@@ -469,25 +469,25 @@ SCENARIO("skip, dispose before", "[skip][operators]"){
const rxsc::test::messages<int> on;
auto xs = sc.make_hot_observable({
- on.on_next(70, 6),
- on.on_next(150, 4),
- on.on_next(210, 9),
- on.on_next(230, 13),
- on.on_next(270, 7),
- on.on_next(280, 1),
- on.on_next(300, -1),
- on.on_next(310, 3),
- on.on_next(340, 8),
- on.on_next(370, 11),
- on.on_next(410, 15),
- on.on_next(415, 16),
- on.on_next(460, 72),
- on.on_next(510, 76),
- on.on_next(560, 32),
- on.on_next(570, -100),
- on.on_next(580, -3),
- on.on_next(590, 5),
- on.on_next(630, 10)
+ on.next(70, 6),
+ on.next(150, 4),
+ on.next(210, 9),
+ on.next(230, 13),
+ on.next(270, 7),
+ on.next(280, 1),
+ on.next(300, -1),
+ on.next(310, 3),
+ on.next(340, 8),
+ on.next(370, 11),
+ on.next(410, 15),
+ on.next(415, 16),
+ on.next(460, 72),
+ on.next(510, 76),
+ on.next(560, 32),
+ on.next(570, -100),
+ on.next(580, -3),
+ on.next(590, 5),
+ on.next(630, 10)
});
WHEN("all generated values are skipped"){
@@ -526,25 +526,25 @@ SCENARIO("skip, dispose after", "[skip][operators]"){
const rxsc::test::messages<int> on;
auto xs = sc.make_hot_observable({
- on.on_next(70, 6),
- on.on_next(150, 4),
- on.on_next(210, 9),
- on.on_next(230, 13),
- on.on_next(270, 7),
- on.on_next(280, 1),
- on.on_next(300, -1),
- on.on_next(310, 3),
- on.on_next(340, 8),
- on.on_next(370, 11),
- on.on_next(410, 15),
- on.on_next(415, 16),
- on.on_next(460, 72),
- on.on_next(510, 76),
- on.on_next(560, 32),
- on.on_next(570, -100),
- on.on_next(580, -3),
- on.on_next(590, 5),
- on.on_next(630, 10)
+ on.next(70, 6),
+ on.next(150, 4),
+ on.next(210, 9),
+ on.next(230, 13),
+ on.next(270, 7),
+ on.next(280, 1),
+ on.next(300, -1),
+ on.next(310, 3),
+ on.next(340, 8),
+ on.next(370, 11),
+ on.next(410, 15),
+ on.next(415, 16),
+ on.next(460, 72),
+ on.next(510, 76),
+ on.next(560, 32),
+ on.next(570, -100),
+ on.next(580, -3),
+ on.next(590, 5),
+ on.next(630, 10)
});
WHEN("some generated values are skipped"){
@@ -561,11 +561,11 @@ SCENARIO("skip, dispose after", "[skip][operators]"){
THEN("the output contains items sent while subscribed"){
auto required = rxu::to_vector({
- on.on_next(280, 1),
- on.on_next(300, -1),
- on.on_next(310, 3),
- on.on_next(340, 8),
- on.on_next(370, 11)
+ on.next(280, 1),
+ on.next(300, -1),
+ on.next(310, 3),
+ on.next(340, 8),
+ on.next(370, 11)
});
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
@@ -589,17 +589,17 @@ SCENARIO("skip, consecutive", "[skip][operators]"){
const rxsc::test::messages<int> on;
auto xs = sc.make_hot_observable({
- on.on_next(70, 6),
- on.on_next(150, 4),
- on.on_next(210, 9),
- on.on_next(230, 13),
- on.on_next(270, 7),
- on.on_next(280, 1),
- on.on_next(300, -1),
- on.on_next(310, 3),
- on.on_next(340, 8),
- on.on_next(370, 11),
- on.on_completed(400)
+ on.next(70, 6),
+ on.next(150, 4),
+ on.next(210, 9),
+ on.next(230, 13),
+ on.next(270, 7),
+ on.next(280, 1),
+ on.next(300, -1),
+ on.next(310, 3),
+ on.next(340, 8),
+ on.next(370, 11),
+ on.completed(400)
});
WHEN("3+2 values are skipped"){
@@ -616,10 +616,10 @@ SCENARIO("skip, consecutive", "[skip][operators]"){
THEN("the output only contains items sent while subscribed"){
auto required = rxu::to_vector({
- on.on_next(310, 3),
- on.on_next(340, 8),
- on.on_next(370, 11),
- on.on_completed(400)
+ on.next(310, 3),
+ on.next(340, 8),
+ on.next(370, 11),
+ on.completed(400)
});
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
diff --git a/Rx/v2/test/operators/skip_until.cpp b/Rx/v2/test/operators/skip_until.cpp
index 51db1ba..2b44673 100644
--- a/Rx/v2/test/operators/skip_until.cpp
+++ b/Rx/v2/test/operators/skip_until.cpp
@@ -12,18 +12,18 @@ SCENARIO("skip_until, some data next", "[skip_until][skip][operators]"){
const rxsc::test::messages<int> on;
auto l = sc.make_hot_observable({
- on.on_next(150, 1),
- on.on_next(210, 2),
- on.on_next(220, 3),
- on.on_next(230, 4),
- on.on_next(240, 5),
- on.on_completed(250)
+ on.next(150, 1),
+ on.next(210, 2),
+ on.next(220, 3),
+ on.next(230, 4),
+ on.next(240, 5),
+ on.completed(250)
});
auto r = sc.make_hot_observable({
- on.on_next(150, 1),
- on.on_next(225, 99),
- on.on_completed(230)
+ on.next(150, 1),
+ on.next(225, 99),
+ on.completed(230)
});
WHEN("one is taken until the other emits a marble"){
@@ -39,9 +39,9 @@ SCENARIO("skip_until, some data next", "[skip_until][skip][operators]"){
THEN("the output only contains items sent while subscribed"){
auto required = rxu::to_vector({
- on.on_next(230, 4),
- on.on_next(240, 5),
- on.on_completed(250)
+ on.next(230, 4),
+ on.next(240, 5),
+ on.completed(250)
});
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
@@ -75,17 +75,17 @@ SCENARIO("skip_until, some data error", "[skip_until][skip][operators]"){
std::runtime_error ex("skip_until on_error from source");
auto l = sc.make_hot_observable({
- on.on_next(150, 1),
- on.on_next(210, 2),
- on.on_next(220, 3),
- on.on_next(230, 4),
- on.on_next(240, 5),
- on.on_completed(250)
+ on.next(150, 1),
+ on.next(210, 2),
+ on.next(220, 3),
+ on.next(230, 4),
+ on.next(240, 5),
+ on.completed(250)
});
auto r = sc.make_hot_observable({
- on.on_next(150, 1),
- on.on_error(225, ex)
+ on.next(150, 1),
+ on.error(225, ex)
});
WHEN("one is taken until the other emits a marble"){
@@ -101,7 +101,7 @@ SCENARIO("skip_until, some data error", "[skip_until][skip][operators]"){
THEN("the output only contains error message"){
auto required = rxu::to_vector({
- on.on_error(225, ex)
+ on.error(225, ex)
});
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
@@ -135,15 +135,15 @@ SCENARIO("skip_until, error some data", "[skip_until][skip][operators]"){
std::runtime_error ex("skip_until on_error from source");
auto l = sc.make_hot_observable({
- on.on_next(150, 1),
- on.on_next(210, 2),
- on.on_error(220, ex)
+ on.next(150, 1),
+ on.next(210, 2),
+ on.error(220, ex)
});
auto r = sc.make_hot_observable({
- on.on_next(150, 1),
- on.on_next(230, 3),
- on.on_completed(250)
+ on.next(150, 1),
+ on.next(230, 3),
+ on.completed(250)
});
WHEN("one is taken until the other emits a marble"){
@@ -159,7 +159,7 @@ SCENARIO("skip_until, error some data", "[skip_until][skip][operators]"){
THEN("the output only contains error message"){
auto required = rxu::to_vector({
- on.on_error(220, ex)
+ on.error(220, ex)
});
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
@@ -191,17 +191,17 @@ SCENARIO("skip_until, some data empty", "[skip_until][skip][operators]"){
const rxsc::test::messages<int> on;
auto l = sc.make_hot_observable({
- on.on_next(150, 1),
- on.on_next(210, 2),
- on.on_next(220, 3),
- on.on_next(230, 4),
- on.on_next(240, 5),
- on.on_completed(250)
+ on.next(150, 1),
+ on.next(210, 2),
+ on.next(220, 3),
+ on.next(230, 4),
+ on.next(240, 5),
+ on.completed(250)
});
auto r = sc.make_hot_observable({
- on.on_next(150, 1),
- on.on_completed(225)
+ on.next(150, 1),
+ on.completed(225)
});
WHEN("one is taken until the other emits a marble"){
@@ -247,13 +247,13 @@ SCENARIO("skip_until, never next", "[skip_until][skip][operators]"){
const rxsc::test::messages<int> on;
auto l = sc.make_hot_observable({
- on.on_next(150, 1)
+ on.next(150, 1)
});
auto r = sc.make_hot_observable({
- on.on_next(150, 1),
- on.on_next(225, 2),
- on.on_completed(250)
+ on.next(150, 1),
+ on.next(225, 2),
+ on.completed(250)
});
WHEN("one is taken until the other emits a marble"){
@@ -301,12 +301,12 @@ SCENARIO("skip_until, never error", "[skip_until][skip][operators]"){
std::runtime_error ex("skip_until on_error from source");
auto l = sc.make_hot_observable({
- on.on_next(150, 1)
+ on.next(150, 1)
});
auto r = sc.make_hot_observable({
- on.on_next(150, 1),
- on.on_error(225, ex)
+ on.next(150, 1),
+ on.error(225, ex)
});
WHEN("one is taken until the other emits a marble"){
@@ -322,7 +322,7 @@ SCENARIO("skip_until, never error", "[skip_until][skip][operators]"){
THEN("the output only contains error message"){
auto required = rxu::to_vector({
- on.on_error(225, ex)
+ on.error(225, ex)
});
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
@@ -356,17 +356,17 @@ SCENARIO("skip_until, some data error after completed", "[skip_until][skip][oper
std::runtime_error ex("skip_until on_error from source");
auto l = sc.make_hot_observable({
- on.on_next(150, 1),
- on.on_next(210, 2),
- on.on_next(220, 3),
- on.on_next(230, 4),
- on.on_next(240, 5),
- on.on_completed(250)
+ on.next(150, 1),
+ on.next(210, 2),
+ on.next(220, 3),
+ on.next(230, 4),
+ on.next(240, 5),
+ on.completed(250)
});
auto r = sc.make_hot_observable({
- on.on_next(150, 1),
- on.on_error(300, ex)
+ on.next(150, 1),
+ on.error(300, ex)
});
WHEN("one is taken until the other emits a marble"){
@@ -382,7 +382,7 @@ SCENARIO("skip_until, some data error after completed", "[skip_until][skip][oper
THEN("the output only contains error message"){
auto required = rxu::to_vector({
- on.on_error(300, ex)
+ on.error(300, ex)
});
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
@@ -414,16 +414,16 @@ SCENARIO("skip_until, some data never", "[skip_until][skip][operators]"){
const rxsc::test::messages<int> on;
auto l = sc.make_hot_observable({
- on.on_next(150, 1),
- on.on_next(210, 2),
- on.on_next(220, 3),
- on.on_next(230, 4),
- on.on_next(240, 5),
- on.on_completed(250)
+ on.next(150, 1),
+ on.next(210, 2),
+ on.next(220, 3),
+ on.next(230, 4),
+ on.next(240, 5),
+ on.completed(250)
});
auto r = sc.make_hot_observable({
- on.on_next(150, 1)
+ on.next(150, 1)
});
WHEN("one is taken until the other emits a marble"){
@@ -469,12 +469,12 @@ SCENARIO("skip_until, never empty", "[skip_until][skip][operators]"){
const rxsc::test::messages<int> on;
auto l = sc.make_hot_observable({
- on.on_next(150, 1)
+ on.next(150, 1)
});
auto r = sc.make_hot_observable({
- on.on_next(150, 1),
- on.on_completed(225)
+ on.next(150, 1),
+ on.completed(225)
});
WHEN("one is taken until the other emits a marble"){
@@ -520,11 +520,11 @@ SCENARIO("skip_until, never never", "[skip_until][skip][operators]"){
const rxsc::test::messages<int> on;
auto l = sc.make_hot_observable({
- on.on_next(150, 1)
+ on.next(150, 1)
});
auto r = sc.make_hot_observable({
- on.on_next(150, 1)
+ on.next(150, 1)
});
WHEN("one is taken until the other emits a marble"){
diff --git a/Rx/v2/test/operators/switch_on_next.cpp b/Rx/v2/test/operators/switch_on_next.cpp
index 9a06b68..32c4bac 100644
--- a/Rx/v2/test/operators/switch_on_next.cpp
+++ b/Rx/v2/test/operators/switch_on_next.cpp
@@ -15,36 +15,36 @@ SCENARIO("switch_on_next - some changes", "[switch_on_next][operators]"){
const rxsc::test::messages<rx::observable<int>> o_on;
auto ys1 = sc.make_cold_observable({
- on.on_next(10, 101),
- on.on_next(20, 102),
- on.on_next(110, 103),
- on.on_next(120, 104),
- on.on_next(210, 105),
- on.on_next(220, 106),
- on.on_completed(230)
+ on.next(10, 101),
+ on.next(20, 102),
+ on.next(110, 103),
+ on.next(120, 104),
+ on.next(210, 105),
+ on.next(220, 106),
+ on.completed(230)
});
auto ys2 = sc.make_cold_observable({
- on.on_next(10, 201),
- on.on_next(20, 202),
- on.on_next(30, 203),
- on.on_next(40, 204),
- on.on_completed(50)
+ on.next(10, 201),
+ on.next(20, 202),
+ on.next(30, 203),
+ on.next(40, 204),
+ on.completed(50)
});
auto ys3 = sc.make_cold_observable({
- on.on_next(10, 301),
- on.on_next(20, 302),
- on.on_next(30, 303),
- on.on_next(40, 304),
- on.on_completed(150)
+ on.next(10, 301),
+ on.next(20, 302),
+ on.next(30, 303),
+ on.next(40, 304),
+ on.completed(150)
});
auto xs = sc.make_hot_observable({
- o_on.on_next(300, ys1),
- o_on.on_next(400, ys2),
- o_on.on_next(500, ys3),
- o_on.on_completed(600)
+ o_on.next(300, ys1),
+ o_on.next(400, ys2),
+ o_on.next(500, ys3),
+ o_on.completed(600)
});
WHEN("distinct values are taken"){
@@ -57,17 +57,17 @@ SCENARIO("switch_on_next - some changes", "[switch_on_next][operators]"){
THEN("the output only contains distinct items sent while subscribed"){
auto required = rxu::to_vector({
- on.on_next(310, 101),
- on.on_next(320, 102),
- on.on_next(410, 201),
- on.on_next(420, 202),
- on.on_next(430, 203),
- on.on_next(440, 204),
- on.on_next(510, 301),
- on.on_next(520, 302),
- on.on_next(530, 303),
- on.on_next(540, 304),
- on.on_completed(650)
+ on.next(310, 101),
+ on.next(320, 102),
+ on.next(410, 201),
+ on.next(420, 202),
+ on.next(430, 203),
+ on.next(440, 204),
+ on.next(510, 301),
+ on.next(520, 302),
+ on.next(530, 303),
+ on.next(540, 304),
+ on.completed(650)
});
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
@@ -118,36 +118,36 @@ SCENARIO("switch_on_next - inner throws", "[switch_on_next][operators]"){
std::runtime_error ex("switch_on_next on_error from source");
auto ys1 = sc.make_cold_observable({
- on.on_next(10, 101),
- on.on_next(20, 102),
- on.on_next(110, 103),
- on.on_next(120, 104),
- on.on_next(210, 105),
- on.on_next(220, 106),
- on.on_completed(230)
+ on.next(10, 101),
+ on.next(20, 102),
+ on.next(110, 103),
+ on.next(120, 104),
+ on.next(210, 105),
+ on.next(220, 106),
+ on.completed(230)
});
auto ys2 = sc.make_cold_observable({
- on.on_next(10, 201),
- on.on_next(20, 202),
- on.on_next(30, 203),
- on.on_next(40, 204),
- on.on_error(50, ex)
+ on.next(10, 201),
+ on.next(20, 202),
+ on.next(30, 203),
+ on.next(40, 204),
+ on.error(50, ex)
});
auto ys3 = sc.make_cold_observable({
- on.on_next(10, 301),
- on.on_next(20, 302),
- on.on_next(30, 303),
- on.on_next(40, 304),
- on.on_completed(150)
+ on.next(10, 301),
+ on.next(20, 302),
+ on.next(30, 303),
+ on.next(40, 304),
+ on.completed(150)
});
auto xs = sc.make_hot_observable({
- o_on.on_next(300, ys1),
- o_on.on_next(400, ys2),
- o_on.on_next(500, ys3),
- o_on.on_completed(600)
+ o_on.next(300, ys1),
+ o_on.next(400, ys2),
+ o_on.next(500, ys3),
+ o_on.completed(600)
});
WHEN("distinct values are taken"){
@@ -160,13 +160,13 @@ SCENARIO("switch_on_next - inner throws", "[switch_on_next][operators]"){
THEN("the output only contains distinct items sent while subscribed"){
auto required = rxu::to_vector({
- on.on_next(310, 101),
- on.on_next(320, 102),
- on.on_next(410, 201),
- on.on_next(420, 202),
- on.on_next(430, 203),
- on.on_next(440, 204),
- on.on_error(450, ex)
+ on.next(310, 101),
+ on.next(320, 102),
+ on.next(410, 201),
+ on.next(420, 202),
+ on.next(430, 203),
+ on.next(440, 204),
+ on.error(450, ex)
});
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
@@ -215,27 +215,27 @@ SCENARIO("switch_on_next - outer throws", "[switch_on_next][operators]"){
std::runtime_error ex("switch_on_next on_error from source");
auto ys1 = sc.make_cold_observable({
- on.on_next(10, 101),
- on.on_next(20, 102),
- on.on_next(110, 103),
- on.on_next(120, 104),
- on.on_next(210, 105),
- on.on_next(220, 106),
- on.on_completed(230)
+ on.next(10, 101),
+ on.next(20, 102),
+ on.next(110, 103),
+ on.next(120, 104),
+ on.next(210, 105),
+ on.next(220, 106),
+ on.completed(230)
});
auto ys2 = sc.make_cold_observable({
- on.on_next(10, 201),
- on.on_next(20, 202),
- on.on_next(30, 203),
- on.on_next(40, 204),
- on.on_completed(50)
+ on.next(10, 201),
+ on.next(20, 202),
+ on.next(30, 203),
+ on.next(40, 204),
+ on.completed(50)
});
auto xs = sc.make_hot_observable({
- o_on.on_next(300, ys1),
- o_on.on_next(400, ys2),
- o_on.on_error(500, ex)
+ o_on.next(300, ys1),
+ o_on.next(400, ys2),
+ o_on.error(500, ex)
});
WHEN("distinct values are taken"){
@@ -248,13 +248,13 @@ SCENARIO("switch_on_next - outer throws", "[switch_on_next][operators]"){
THEN("the output only contains distinct items sent while subscribed"){
auto required = rxu::to_vector({
- on.on_next(310, 101),
- on.on_next(320, 102),
- on.on_next(410, 201),
- on.on_next(420, 202),
- on.on_next(430, 203),
- on.on_next(440, 204),
- on.on_error(500, ex)
+ on.next(310, 101),
+ on.next(320, 102),
+ on.next(410, 201),
+ on.next(420, 202),
+ on.next(430, 203),
+ on.next(440, 204),
+ on.error(500, ex)
});
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
@@ -295,7 +295,7 @@ SCENARIO("switch_on_next - no inner", "[switch_on_next][operators]"){
const rxsc::test::messages<rx::observable<int>> o_on;
auto xs = sc.make_hot_observable({
- o_on.on_completed(500)
+ o_on.completed(500)
});
WHEN("distinct values are taken"){
@@ -308,7 +308,7 @@ SCENARIO("switch_on_next - no inner", "[switch_on_next][operators]"){
THEN("the output only contains distinct items sent while subscribed"){
auto required = rxu::to_vector({
- on.on_completed(500)
+ on.completed(500)
});
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
@@ -333,18 +333,18 @@ SCENARIO("switch_on_next - inner completes", "[switch_on_next][operators]"){
const rxsc::test::messages<rx::observable<int>> o_on;
auto ys1 = sc.make_cold_observable({
- on.on_next(10, 101),
- on.on_next(20, 102),
- on.on_next(110, 103),
- on.on_next(120, 104),
- on.on_next(210, 105),
- on.on_next(220, 106),
- on.on_completed(230)
+ on.next(10, 101),
+ on.next(20, 102),
+ on.next(110, 103),
+ on.next(120, 104),
+ on.next(210, 105),
+ on.next(220, 106),
+ on.completed(230)
});
auto xs = sc.make_hot_observable({
- o_on.on_next(300, ys1),
- o_on.on_completed(540)
+ o_on.next(300, ys1),
+ o_on.completed(540)
});
WHEN("distinct values are taken"){
@@ -357,13 +357,13 @@ SCENARIO("switch_on_next - inner completes", "[switch_on_next][operators]"){
THEN("the output only contains distinct items sent while subscribed"){
auto required = rxu::to_vector({
- on.on_next(310, 101),
- on.on_next(320, 102),
- on.on_next(410, 103),
- on.on_next(420, 104),
- on.on_next(510, 105),
- on.on_next(520, 106),
- on.on_completed(540)
+ on.next(310, 101),
+ on.next(320, 102),
+ on.next(410, 103),
+ on.next(420, 104),
+ on.next(510, 105),
+ on.next(520, 106),
+ on.completed(540)
});
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
diff --git a/Rx/v2/test/operators/take.cpp b/Rx/v2/test/operators/take.cpp
index 83354ef..846734b 100644
--- a/Rx/v2/test/operators/take.cpp
+++ b/Rx/v2/test/operators/take.cpp
@@ -13,12 +13,12 @@ SCENARIO("take 2", "[take][operators]"){
const rxsc::test::messages<int> on;
auto xs = sc.make_hot_observable({
- on.on_next(150, 1),
- on.on_next(210, 2),
- on.on_next(220, 3),
- on.on_next(230, 4),
- on.on_next(240, 5),
- on.on_completed(250)
+ on.next(150, 1),
+ on.next(210, 2),
+ on.next(220, 3),
+ on.next(230, 4),
+ on.next(240, 5),
+ on.completed(250)
});
WHEN("2 values are taken"){
@@ -34,9 +34,9 @@ SCENARIO("take 2", "[take][operators]"){
THEN("the output only contains items sent while subscribed"){
auto required = rxu::to_vector({
- on.on_next(210, 2),
- on.on_next(220, 3),
- on.on_completed(220)
+ on.next(210, 2),
+ on.next(220, 3),
+ on.completed(220)
});
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
@@ -61,26 +61,26 @@ SCENARIO("take, complete after", "[take][operators]"){
const rxsc::test::messages<int> on;
auto xs = sc.make_hot_observable({
- on.on_next(70, 6),
- on.on_next(150, 4),
- on.on_next(210, 9),
- on.on_next(230, 13),
- on.on_next(270, 7),
- on.on_next(280, 1),
- on.on_next(300, -1),
- on.on_next(310, 3),
- on.on_next(340, 8),
- on.on_next(370, 11),
- on.on_next(410, 15),
- on.on_next(415, 16),
- on.on_next(460, 72),
- on.on_next(510, 76),
- on.on_next(560, 32),
- on.on_next(570, -100),
- on.on_next(580, -3),
- on.on_next(590, 5),
- on.on_next(630, 10),
- on.on_completed(690)
+ on.next(70, 6),
+ on.next(150, 4),
+ on.next(210, 9),
+ on.next(230, 13),
+ on.next(270, 7),
+ on.next(280, 1),
+ on.next(300, -1),
+ on.next(310, 3),
+ on.next(340, 8),
+ on.next(370, 11),
+ on.next(410, 15),
+ on.next(415, 16),
+ on.next(460, 72),
+ on.next(510, 76),
+ on.next(560, 32),
+ on.next(570, -100),
+ on.next(580, -3),
+ on.next(590, 5),
+ on.next(630, 10),
+ on.completed(690)
});
WHEN("20 values are taken"){
@@ -96,24 +96,24 @@ SCENARIO("take, complete after", "[take][operators]"){
THEN("the output only contains items sent while subscribed"){
auto required = rxu::to_vector({
- on.on_next(210, 9),
- on.on_next(230, 13),
- on.on_next(270, 7),
- on.on_next(280, 1),
- on.on_next(300, -1),
- on.on_next(310, 3),
- on.on_next(340, 8),
- on.on_next(370, 11),
- on.on_next(410, 15),
- on.on_next(415, 16),
- on.on_next(460, 72),
- on.on_next(510, 76),
- on.on_next(560, 32),
- on.on_next(570, -100),
- on.on_next(580, -3),
- on.on_next(590, 5),
- on.on_next(630, 10),
- on.on_completed(690)
+ on.next(210, 9),
+ on.next(230, 13),
+ on.next(270, 7),
+ on.next(280, 1),
+ on.next(300, -1),
+ on.next(310, 3),
+ on.next(340, 8),
+ on.next(370, 11),
+ on.next(410, 15),
+ on.next(415, 16),
+ on.next(460, 72),
+ on.next(510, 76),
+ on.next(560, 32),
+ on.next(570, -100),
+ on.next(580, -3),
+ on.next(590, 5),
+ on.next(630, 10),
+ on.completed(690)
});
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
@@ -138,26 +138,26 @@ SCENARIO("take, complete same", "[take][operators]"){
const rxsc::test::messages<int> on;
auto xs = sc.make_hot_observable({
- on.on_next(70, 6),
- on.on_next(150, 4),
- on.on_next(210, 9),
- on.on_next(230, 13),
- on.on_next(270, 7),
- on.on_next(280, 1),
- on.on_next(300, -1),
- on.on_next(310, 3),
- on.on_next(340, 8),
- on.on_next(370, 11),
- on.on_next(410, 15),
- on.on_next(415, 16),
- on.on_next(460, 72),
- on.on_next(510, 76),
- on.on_next(560, 32),
- on.on_next(570, -100),
- on.on_next(580, -3),
- on.on_next(590, 5),
- on.on_next(630, 10),
- on.on_completed(690)
+ on.next(70, 6),
+ on.next(150, 4),
+ on.next(210, 9),
+ on.next(230, 13),
+ on.next(270, 7),
+ on.next(280, 1),
+ on.next(300, -1),
+ on.next(310, 3),
+ on.next(340, 8),
+ on.next(370, 11),
+ on.next(410, 15),
+ on.next(415, 16),
+ on.next(460, 72),
+ on.next(510, 76),
+ on.next(560, 32),
+ on.next(570, -100),
+ on.next(580, -3),
+ on.next(590, 5),
+ on.next(630, 10),
+ on.completed(690)
});
WHEN("17 values are taken"){
@@ -173,24 +173,24 @@ SCENARIO("take, complete same", "[take][operators]"){
THEN("the output only contains items sent while subscribed"){
auto required = rxu::to_vector({
- on.on_next(210, 9),
- on.on_next(230, 13),
- on.on_next(270, 7),
- on.on_next(280, 1),
- on.on_next(300, -1),
- on.on_next(310, 3),
- on.on_next(340, 8),
- on.on_next(370, 11),
- on.on_next(410, 15),
- on.on_next(415, 16),
- on.on_next(460, 72),
- on.on_next(510, 76),
- on.on_next(560, 32),
- on.on_next(570, -100),
- on.on_next(580, -3),
- on.on_next(590, 5),
- on.on_next(630, 10),
- on.on_completed(630)
+ on.next(210, 9),
+ on.next(230, 13),
+ on.next(270, 7),
+ on.next(280, 1),
+ on.next(300, -1),
+ on.next(310, 3),
+ on.next(340, 8),
+ on.next(370, 11),
+ on.next(410, 15),
+ on.next(415, 16),
+ on.next(460, 72),
+ on.next(510, 76),
+ on.next(560, 32),
+ on.next(570, -100),
+ on.next(580, -3),
+ on.next(590, 5),
+ on.next(630, 10),
+ on.completed(630)
});
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
@@ -215,26 +215,26 @@ SCENARIO("take, complete before", "[take][operators]"){
const rxsc::test::messages<int> on;
auto xs = sc.make_hot_observable({
- on.on_next(70, 6),
- on.on_next(150, 4),
- on.on_next(210, 9),
- on.on_next(230, 13),
- on.on_next(270, 7),
- on.on_next(280, 1),
- on.on_next(300, -1),
- on.on_next(310, 3),
- on.on_next(340, 8),
- on.on_next(370, 11),
- on.on_next(410, 15),
- on.on_next(415, 16),
- on.on_next(460, 72),
- on.on_next(510, 76),
- on.on_next(560, 32),
- on.on_next(570, -100),
- on.on_next(580, -3),
- on.on_next(590, 5),
- on.on_next(630, 10),
- on.on_completed(690)
+ on.next(70, 6),
+ on.next(150, 4),
+ on.next(210, 9),
+ on.next(230, 13),
+ on.next(270, 7),
+ on.next(280, 1),
+ on.next(300, -1),
+ on.next(310, 3),
+ on.next(340, 8),
+ on.next(370, 11),
+ on.next(410, 15),
+ on.next(415, 16),
+ on.next(460, 72),
+ on.next(510, 76),
+ on.next(560, 32),
+ on.next(570, -100),
+ on.next(580, -3),
+ on.next(590, 5),
+ on.next(630, 10),
+ on.completed(690)
});
WHEN("10 values are taken"){
@@ -250,17 +250,17 @@ SCENARIO("take, complete before", "[take][operators]"){
THEN("the output only contains items sent while subscribed"){
auto required = rxu::to_vector({
- on.on_next(210, 9),
- on.on_next(230, 13),
- on.on_next(270, 7),
- on.on_next(280, 1),
- on.on_next(300, -1),
- on.on_next(310, 3),
- on.on_next(340, 8),
- on.on_next(370, 11),
- on.on_next(410, 15),
- on.on_next(415, 16),
- on.on_completed(415)
+ on.next(210, 9),
+ on.next(230, 13),
+ on.next(270, 7),
+ on.next(280, 1),
+ on.next(300, -1),
+ on.next(310, 3),
+ on.next(340, 8),
+ on.next(370, 11),
+ on.next(410, 15),
+ on.next(415, 16),
+ on.completed(415)
});
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
@@ -287,26 +287,26 @@ SCENARIO("take, error after", "[take][operators]"){
std::runtime_error ex("take on_error from source");
auto xs = sc.make_hot_observable({
- on.on_next(70, 6),
- on.on_next(150, 4),
- on.on_next(210, 9),
- on.on_next(230, 13),
- on.on_next(270, 7),
- on.on_next(280, 1),
- on.on_next(300, -1),
- on.on_next(310, 3),
- on.on_next(340, 8),
- on.on_next(370, 11),
- on.on_next(410, 15),
- on.on_next(415, 16),
- on.on_next(460, 72),
- on.on_next(510, 76),
- on.on_next(560, 32),
- on.on_next(570, -100),
- on.on_next(580, -3),
- on.on_next(590, 5),
- on.on_next(630, 10),
- on.on_error(690, ex)
+ on.next(70, 6),
+ on.next(150, 4),
+ on.next(210, 9),
+ on.next(230, 13),
+ on.next(270, 7),
+ on.next(280, 1),
+ on.next(300, -1),
+ on.next(310, 3),
+ on.next(340, 8),
+ on.next(370, 11),
+ on.next(410, 15),
+ on.next(415, 16),
+ on.next(460, 72),
+ on.next(510, 76),
+ on.next(560, 32),
+ on.next(570, -100),
+ on.next(580, -3),
+ on.next(590, 5),
+ on.next(630, 10),
+ on.error(690, ex)
});
WHEN("20 values are taken"){
@@ -322,24 +322,24 @@ SCENARIO("take, error after", "[take][operators]"){
THEN("the output only contains items sent while subscribed"){
auto required = rxu::to_vector({
- on.on_next(210, 9),
- on.on_next(230, 13),
- on.on_next(270, 7),
- on.on_next(280, 1),
- on.on_next(300, -1),
- on.on_next(310, 3),
- on.on_next(340, 8),
- on.on_next(370, 11),
- on.on_next(410, 15),
- on.on_next(415, 16),
- on.on_next(460, 72),
- on.on_next(510, 76),
- on.on_next(560, 32),
- on.on_next(570, -100),
- on.on_next(580, -3),
- on.on_next(590, 5),
- on.on_next(630, 10),
- on.on_error(690, ex)
+ on.next(210, 9),
+ on.next(230, 13),
+ on.next(270, 7),
+ on.next(280, 1),
+ on.next(300, -1),
+ on.next(310, 3),
+ on.next(340, 8),
+ on.next(370, 11),
+ on.next(410, 15),
+ on.next(415, 16),
+ on.next(460, 72),
+ on.next(510, 76),
+ on.next(560, 32),
+ on.next(570, -100),
+ on.next(580, -3),
+ on.next(590, 5),
+ on.next(630, 10),
+ on.error(690, ex)
});
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
@@ -364,26 +364,26 @@ SCENARIO("take, error same", "[take][operators]"){
const rxsc::test::messages<int> on;
auto xs = sc.make_hot_observable({
- on.on_next(70, 6),
- on.on_next(150, 4),
- on.on_next(210, 9),
- on.on_next(230, 13),
- on.on_next(270, 7),
- on.on_next(280, 1),
- on.on_next(300, -1),
- on.on_next(310, 3),
- on.on_next(340, 8),
- on.on_next(370, 11),
- on.on_next(410, 15),
- on.on_next(415, 16),
- on.on_next(460, 72),
- on.on_next(510, 76),
- on.on_next(560, 32),
- on.on_next(570, -100),
- on.on_next(580, -3),
- on.on_next(590, 5),
- on.on_next(630, 10),
- on.on_error(690, std::runtime_error("error in unsubscribed stream"))
+ on.next(70, 6),
+ on.next(150, 4),
+ on.next(210, 9),
+ on.next(230, 13),
+ on.next(270, 7),
+ on.next(280, 1),
+ on.next(300, -1),
+ on.next(310, 3),
+ on.next(340, 8),
+ on.next(370, 11),
+ on.next(410, 15),
+ on.next(415, 16),
+ on.next(460, 72),
+ on.next(510, 76),
+ on.next(560, 32),
+ on.next(570, -100),
+ on.next(580, -3),
+ on.next(590, 5),
+ on.next(630, 10),
+ on.error(690, std::runtime_error("error in unsubscribed stream"))
});
WHEN("17 values are taken"){
@@ -399,24 +399,24 @@ SCENARIO("take, error same", "[take][operators]"){
THEN("the output only contains items sent while subscribed"){
auto required = rxu::to_vector({
- on.on_next(210, 9),
- on.on_next(230, 13),
- on.on_next(270, 7),
- on.on_next(280, 1),
- on.on_next(300, -1),
- on.on_next(310, 3),
- on.on_next(340, 8),
- on.on_next(370, 11),
- on.on_next(410, 15),
- on.on_next(415, 16),
- on.on_next(460, 72),
- on.on_next(510, 76),
- on.on_next(560, 32),
- on.on_next(570, -100),
- on.on_next(580, -3),
- on.on_next(590, 5),
- on.on_next(630, 10),
- on.on_completed(630)
+ on.next(210, 9),
+ on.next(230, 13),
+ on.next(270, 7),
+ on.next(280, 1),
+ on.next(300, -1),
+ on.next(310, 3),
+ on.next(340, 8),
+ on.next(370, 11),
+ on.next(410, 15),
+ on.next(415, 16),
+ on.next(460, 72),
+ on.next(510, 76),
+ on.next(560, 32),
+ on.next(570, -100),
+ on.next(580, -3),
+ on.next(590, 5),
+ on.next(630, 10),
+ on.completed(630)
});
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
@@ -441,26 +441,26 @@ SCENARIO("take, error before", "[take][operators]"){
const rxsc::test::messages<int> on;
auto xs = sc.make_hot_observable({
- on.on_next(70, 6),
- on.on_next(150, 4),
- on.on_next(210, 9),
- on.on_next(230, 13),
- on.on_next(270, 7),
- on.on_next(280, 1),
- on.on_next(300, -1),
- on.on_next(310, 3),
- on.on_next(340, 8),
- on.on_next(370, 11),
- on.on_next(410, 15),
- on.on_next(415, 16),
- on.on_next(460, 72),
- on.on_next(510, 76),
- on.on_next(560, 32),
- on.on_next(570, -100),
- on.on_next(580, -3),
- on.on_next(590, 5),
- on.on_next(630, 10),
- on.on_error(690, std::runtime_error("error in unsubscribed stream"))
+ on.next(70, 6),
+ on.next(150, 4),
+ on.next(210, 9),
+ on.next(230, 13),
+ on.next(270, 7),
+ on.next(280, 1),
+ on.next(300, -1),
+ on.next(310, 3),
+ on.next(340, 8),
+ on.next(370, 11),
+ on.next(410, 15),
+ on.next(415, 16),
+ on.next(460, 72),
+ on.next(510, 76),
+ on.next(560, 32),
+ on.next(570, -100),
+ on.next(580, -3),
+ on.next(590, 5),
+ on.next(630, 10),
+ on.error(690, std::runtime_error("error in unsubscribed stream"))
});
WHEN("3 values are taken"){
@@ -476,10 +476,10 @@ SCENARIO("take, error before", "[take][operators]"){
THEN("the output only contains items sent while subscribed"){
auto required = rxu::to_vector({
- on.on_next(210, 9),
- on.on_next(230, 13),
- on.on_next(270, 7),
- on.on_completed(270)
+ on.next(210, 9),
+ on.next(230, 13),
+ on.next(270, 7),
+ on.completed(270)
});
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
@@ -504,25 +504,25 @@ SCENARIO("take, dispose before", "[take][operators]"){
const rxsc::test::messages<int> on;
auto xs = sc.make_hot_observable({
- on.on_next(70, 6),
- on.on_next(150, 4),
- on.on_next(210, 9),
- on.on_next(230, 13),
- on.on_next(270, 7),
- on.on_next(280, 1),
- on.on_next(300, -1),
- on.on_next(310, 3),
- on.on_next(340, 8),
- on.on_next(370, 11),
- on.on_next(410, 15),
- on.on_next(415, 16),
- on.on_next(460, 72),
- on.on_next(510, 76),
- on.on_next(560, 32),
- on.on_next(570, -100),
- on.on_next(580, -3),
- on.on_next(590, 5),
- on.on_next(630, 10)
+ on.next(70, 6),
+ on.next(150, 4),
+ on.next(210, 9),
+ on.next(230, 13),
+ on.next(270, 7),
+ on.next(280, 1),
+ on.next(300, -1),
+ on.next(310, 3),
+ on.next(340, 8),
+ on.next(370, 11),
+ on.next(410, 15),
+ on.next(415, 16),
+ on.next(460, 72),
+ on.next(510, 76),
+ on.next(560, 32),
+ on.next(570, -100),
+ on.next(580, -3),
+ on.next(590, 5),
+ on.next(630, 10)
});
WHEN("3 values are taken"){
@@ -539,8 +539,8 @@ SCENARIO("take, dispose before", "[take][operators]"){
THEN("the output only contains items sent while subscribed"){
auto required = rxu::to_vector({
- on.on_next(210, 9),
- on.on_next(230, 13)
+ on.next(210, 9),
+ on.next(230, 13)
});
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
@@ -565,25 +565,25 @@ SCENARIO("take, dispose after", "[take][operators]"){
const rxsc::test::messages<int> on;
auto xs = sc.make_hot_observable({
- on.on_next(70, 6),
- on.on_next(150, 4),
- on.on_next(210, 9),
- on.on_next(230, 13),
- on.on_next(270, 7),
- on.on_next(280, 1),
- on.on_next(300, -1),
- on.on_next(310, 3),
- on.on_next(340, 8),
- on.on_next(370, 11),
- on.on_next(410, 15),
- on.on_next(415, 16),
- on.on_next(460, 72),
- on.on_next(510, 76),
- on.on_next(560, 32),
- on.on_next(570, -100),
- on.on_next(580, -3),
- on.on_next(590, 5),
- on.on_next(630, 10)
+ on.next(70, 6),
+ on.next(150, 4),
+ on.next(210, 9),
+ on.next(230, 13),
+ on.next(270, 7),
+ on.next(280, 1),
+ on.next(300, -1),
+ on.next(310, 3),
+ on.next(340, 8),
+ on.next(370, 11),
+ on.next(410, 15),
+ on.next(415, 16),
+ on.next(460, 72),
+ on.next(510, 76),
+ on.next(560, 32),
+ on.next(570, -100),
+ on.next(580, -3),
+ on.next(590, 5),
+ on.next(630, 10)
});
WHEN("3 values are taken"){
@@ -600,10 +600,10 @@ SCENARIO("take, dispose after", "[take][operators]"){
THEN("the output only contains items sent while subscribed"){
auto required = rxu::to_vector({
- on.on_next(210, 9),
- on.on_next(230, 13),
- on.on_next(270, 7),
- on.on_completed(270)
+ on.next(210, 9),
+ on.next(230, 13),
+ on.next(270, 7),
+ on.completed(270)
});
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
diff --git a/Rx/v2/test/operators/take_until.cpp b/Rx/v2/test/operators/take_until.cpp
index 432b7e3..8afb0f6 100644
--- a/Rx/v2/test/operators/take_until.cpp
+++ b/Rx/v2/test/operators/take_until.cpp
@@ -12,18 +12,18 @@ SCENARIO("take_until trigger on_next", "[take_until][take][operators]"){
const rxsc::test::messages<int> on;
auto xs = sc.make_hot_observable({
- on.on_next(150, 1),
- on.on_next(210, 2),
- on.on_next(220, 3),
- on.on_next(230, 4),
- on.on_next(240, 5),
- on.on_completed(250)
+ on.next(150, 1),
+ on.next(210, 2),
+ on.next(220, 3),
+ on.next(230, 4),
+ on.next(240, 5),
+ on.completed(250)
});
auto ys = sc.make_hot_observable({
- on.on_next(150, 1),
- on.on_next(225, 99),
- on.on_completed(230)
+ on.next(150, 1),
+ on.next(225, 99),
+ on.completed(230)
});
WHEN("one is taken until the other emits a marble"){
@@ -39,9 +39,9 @@ SCENARIO("take_until trigger on_next", "[take_until][take][operators]"){
THEN("the output only contains items sent while subscribed"){
auto required = rxu::to_vector({
- on.on_next(210, 2),
- on.on_next(220, 3),
- on.on_completed(225)
+ on.next(210, 2),
+ on.next(220, 3),
+ on.completed(225)
});
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
@@ -74,18 +74,18 @@ SCENARIO("take_until, preempt some data next", "[take_until][take][operators]"){
const rxsc::test::messages<int> on;
auto l = sc.make_hot_observable({
- on.on_next(150, 1),
- on.on_next(210, 2),
- on.on_next(220, 3),
- on.on_next(230, 4),
- on.on_next(240, 5),
- on.on_completed(250)
+ on.next(150, 1),
+ on.next(210, 2),
+ on.next(220, 3),
+ on.next(230, 4),
+ on.next(240, 5),
+ on.completed(250)
});
auto r = sc.make_hot_observable({
- on.on_next(150, 1),
- on.on_next(225, 99),
- on.on_completed(230)
+ on.next(150, 1),
+ on.next(225, 99),
+ on.completed(230)
});
WHEN("one is taken until the other emits a marble"){
@@ -101,9 +101,9 @@ SCENARIO("take_until, preempt some data next", "[take_until][take][operators]"){
THEN("the output only contains items sent while subscribed"){
auto required = rxu::to_vector({
- on.on_next(210, 2),
- on.on_next(220, 3),
- on.on_completed(225)
+ on.next(210, 2),
+ on.next(220, 3),
+ on.completed(225)
});
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
@@ -138,17 +138,17 @@ SCENARIO("take_until, preempt some data error", "[take_until][take][operators]")
std::runtime_error ex("take_until on_error from source");
auto l = sc.make_hot_observable({
- on.on_next(150, 1),
- on.on_next(210, 2),
- on.on_next(220, 3),
- on.on_next(230, 4),
- on.on_next(240, 5),
- on.on_completed(250)
+ on.next(150, 1),
+ on.next(210, 2),
+ on.next(220, 3),
+ on.next(230, 4),
+ on.next(240, 5),
+ on.completed(250)
});
auto r = sc.make_hot_observable({
- on.on_next(150, 1),
- on.on_error(225, ex)
+ on.next(150, 1),
+ on.error(225, ex)
});
WHEN("one is taken until the other emits a marble"){
@@ -164,9 +164,9 @@ SCENARIO("take_until, preempt some data error", "[take_until][take][operators]")
THEN("the output only contains items sent while subscribed"){
auto required = rxu::to_vector({
- on.on_next(210, 2),
- on.on_next(220, 3),
- on.on_error(225, ex)
+ on.next(210, 2),
+ on.next(220, 3),
+ on.error(225, ex)
});
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
@@ -199,17 +199,17 @@ SCENARIO("take_until, no-preempt some data empty", "[take_until][take][operators
const rxsc::test::messages<int> on;
auto l = sc.make_hot_observable({
- on.on_next(150, 1),
- on.on_next(210, 2),
- on.on_next(220, 3),
- on.on_next(230, 4),
- on.on_next(240, 5),
- on.on_completed(250)
+ on.next(150, 1),
+ on.next(210, 2),
+ on.next(220, 3),
+ on.next(230, 4),
+ on.next(240, 5),
+ on.completed(250)
});
auto r = sc.make_hot_observable({
- on.on_next(150, 1),
- on.on_completed(225)
+ on.next(150, 1),
+ on.completed(225)
});
WHEN("one is taken until the other emits a marble"){
@@ -225,11 +225,11 @@ SCENARIO("take_until, no-preempt some data empty", "[take_until][take][operators
THEN("the output only contains items sent while subscribed"){
auto required = rxu::to_vector({
- on.on_next(210, 2),
- on.on_next(220, 3),
- on.on_next(230, 4),
- on.on_next(240, 5),
- on.on_completed(250)
+ on.next(210, 2),
+ on.next(220, 3),
+ on.next(230, 4),
+ on.next(240, 5),
+ on.completed(250)
});
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
@@ -262,16 +262,16 @@ SCENARIO("take_until, no-preempt some data never", "[take_until][take][operators
const rxsc::test::messages<int> on;
auto l = sc.make_hot_observable({
- on.on_next(150, 1),
- on.on_next(210, 2),
- on.on_next(220, 3),
- on.on_next(230, 4),
- on.on_next(240, 5),
- on.on_completed(250)
+ on.next(150, 1),
+ on.next(210, 2),
+ on.next(220, 3),
+ on.next(230, 4),
+ on.next(240, 5),
+ on.completed(250)
});
auto r = sc.make_hot_observable({
- on.on_next(150, 1)
+ on.next(150, 1)
});
WHEN("one is taken until the other emits a marble"){
@@ -287,11 +287,11 @@ SCENARIO("take_until, no-preempt some data never", "[take_until][take][operators
THEN("the output only contains items sent while subscribed"){
auto required = rxu::to_vector({
- on.on_next(210, 2),
- on.on_next(220, 3),
- on.on_next(230, 4),
- on.on_next(240, 5),
- on.on_completed(250)
+ on.next(210, 2),
+ on.next(220, 3),
+ on.next(230, 4),
+ on.next(240, 5),
+ on.completed(250)
});
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
@@ -324,13 +324,13 @@ SCENARIO("take_until, preempt never next", "[take_until][take][operators]"){
const rxsc::test::messages<int> on;
auto l = sc.make_hot_observable({
- on.on_next(150, 1)
+ on.next(150, 1)
});
auto r = sc.make_hot_observable({
- on.on_next(150, 1),
- on.on_next(225, 2), //!
- on.on_completed(250)
+ on.next(150, 1),
+ on.next(225, 2), //!
+ on.completed(250)
});
WHEN("one is taken until the other emits a marble"){
@@ -346,7 +346,7 @@ SCENARIO("take_until, preempt never next", "[take_until][take][operators]"){
THEN("the output only contains items sent while subscribed"){
auto required = rxu::to_vector({
- on.on_completed(225)
+ on.completed(225)
});
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
@@ -381,12 +381,12 @@ SCENARIO("take_until, preempt never error", "[take_until][take][operators]"){
std::runtime_error ex("take_until on_error from source");
auto l = sc.make_hot_observable({
- on.on_next(150, 1)
+ on.next(150, 1)
});
auto r = sc.make_hot_observable({
- on.on_next(150, 1),
- on.on_error(225, ex)
+ on.next(150, 1),
+ on.error(225, ex)
});
WHEN("one is taken until the other emits a marble"){
@@ -402,7 +402,7 @@ SCENARIO("take_until, preempt never error", "[take_until][take][operators]"){
THEN("the output only contains items sent while subscribed"){
auto required = rxu::to_vector({
- on.on_error(225, ex)
+ on.error(225, ex)
});
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
@@ -435,12 +435,12 @@ SCENARIO("take_until, no-preempt never empty", "[take_until][take][operators]"){
const rxsc::test::messages<int> on;
auto l = sc.make_hot_observable({
- on.on_next(150, 1)
+ on.next(150, 1)
});
auto r = sc.make_hot_observable({
- on.on_next(150, 1),
- on.on_completed(225)
+ on.next(150, 1),
+ on.completed(225)
});
WHEN("one is taken until the other emits a marble"){
@@ -487,11 +487,11 @@ SCENARIO("take_until, no-preempt never never", "[take_until][take][operators]"){
const rxsc::test::messages<int> on;
auto l = sc.make_hot_observable({
- on.on_next(150, 1)
+ on.next(150, 1)
});
auto r = sc.make_hot_observable({
- on.on_next(150, 1)
+ on.next(150, 1)
});
WHEN("one is taken until the other emits a marble"){
@@ -538,15 +538,15 @@ SCENARIO("take_until, preempt before first produced", "[take_until][take][operat
const rxsc::test::messages<int> on;
auto l = sc.make_hot_observable({
- on.on_next(150, 1),
- on.on_next(230, 2),
- on.on_completed(240)
+ on.next(150, 1),
+ on.next(230, 2),
+ on.completed(240)
});
auto r = sc.make_hot_observable({
- on.on_next(150, 1),
- on.on_next(210, 2), //!
- on.on_completed(220)
+ on.next(150, 1),
+ on.next(210, 2), //!
+ on.completed(220)
});
WHEN("one is taken until the other emits a marble"){
@@ -562,7 +562,7 @@ SCENARIO("take_until, preempt before first produced", "[take_until][take][operat
THEN("the output only contains items sent while subscribed"){
auto required = rxu::to_vector({
- on.on_completed(210)
+ on.completed(210)
});
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
@@ -597,15 +597,15 @@ SCENARIO("take_until, preempt before first produced, remain silent and proper un
bool sourceNotDisposed = false;
auto l = sc.make_hot_observable({
- on.on_next(150, 1),
- on.on_error(215, std::runtime_error("error in unsubscribed stream")), // should not come
- on.on_completed(240)
+ on.next(150, 1),
+ on.error(215, std::runtime_error("error in unsubscribed stream")), // should not come
+ on.completed(240)
});
auto r = sc.make_hot_observable({
- on.on_next(150, 1),
- on.on_next(210, 2), //!
- on.on_completed(220)
+ on.next(150, 1),
+ on.next(210, 2), //!
+ on.completed(220)
});
WHEN("one is taken until the other emits a marble"){
@@ -622,7 +622,7 @@ SCENARIO("take_until, preempt before first produced, remain silent and proper un
THEN("the output only contains items sent while subscribed"){
auto required = rxu::to_vector({
- on.on_completed(210)
+ on.completed(210)
});
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
@@ -647,15 +647,15 @@ SCENARIO("take_until, no-preempt after last produced, proper unsubscribe signal"
bool signalNotDisposed = false;
auto l = sc.make_hot_observable({
- on.on_next(150, 1),
- on.on_next(230, 2),
- on.on_completed(240)
+ on.next(150, 1),
+ on.next(230, 2),
+ on.completed(240)
});
auto r = sc.make_hot_observable({
- on.on_next(150, 1),
- on.on_next(250, 2),
- on.on_completed(260)
+ on.next(150, 1),
+ on.next(250, 2),
+ on.completed(260)
});
WHEN("one is taken until the other emits a marble"){
@@ -672,8 +672,8 @@ SCENARIO("take_until, no-preempt after last produced, proper unsubscribe signal"
THEN("the output only contains items sent while subscribed"){
auto required = rxu::to_vector({
- on.on_next(230, 2),
- on.on_completed(240)
+ on.next(230, 2),
+ on.completed(240)
});
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
@@ -698,13 +698,13 @@ SCENARIO("take_until, error some", "[take_until][take][operators]"){
std::runtime_error ex("take_until on_error from source");
auto l = sc.make_hot_observable({
- on.on_next(150, 1),
- on.on_error(225, ex)
+ on.next(150, 1),
+ on.error(225, ex)
});
auto r = sc.make_hot_observable({
- on.on_next(150, 1),
- on.on_next(240, 2)
+ on.next(150, 1),
+ on.next(240, 2)
});
WHEN("one is taken until the other emits a marble"){
@@ -720,7 +720,7 @@ SCENARIO("take_until, error some", "[take_until][take][operators]"){
THEN("the output only contains items sent while subscribed"){
auto required = rxu::to_vector({
- on.on_error(225, ex)
+ on.error(225, ex)
});
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
diff --git a/Rx/v2/test/operators/window.cpp b/Rx/v2/test/operators/window.cpp
index af54699..73ef113 100644
--- a/Rx/v2/test/operators/window.cpp
+++ b/Rx/v2/test/operators/window.cpp
@@ -17,16 +17,16 @@ SCENARIO("window count, basic", "[window][operators]"){
const rxsc::test::messages<rx::observable<int>> o_on;
auto xs = sc.make_hot_observable({
- on.on_next(100, 1),
- on.on_next(210, 2),
- on.on_next(240, 3),
- on.on_next(280, 4),
- on.on_next(320, 5),
- on.on_next(350, 6),
- on.on_next(380, 7),
- on.on_next(420, 8),
- on.on_next(470, 9),
- on.on_completed(600)
+ on.next(100, 1),
+ on.next(210, 2),
+ on.next(240, 3),
+ on.next(280, 4),
+ on.next(320, 5),
+ on.next(350, 6),
+ on.next(380, 7),
+ on.next(420, 8),
+ on.next(470, 9),
+ on.completed(600)
});
WHEN("group each int with the next 2 ints"){
@@ -42,18 +42,18 @@ SCENARIO("window count, basic", "[window][operators]"){
THEN("the output contains merged groups of ints"){
auto required = rxu::to_vector({
- on.on_next(210, 2),
- on.on_next(240, 3),
- on.on_next(280, 4),
- on.on_next(280, 4),
- on.on_next(320, 5),
- on.on_next(350, 6),
- on.on_next(350, 6),
- on.on_next(380, 7),
- on.on_next(420, 8),
- on.on_next(420, 8),
- on.on_next(470, 9),
- on.on_completed(600)
+ on.next(210, 2),
+ on.next(240, 3),
+ on.next(280, 4),
+ on.next(280, 4),
+ on.next(320, 5),
+ on.next(350, 6),
+ on.next(350, 6),
+ on.next(380, 7),
+ on.next(420, 8),
+ on.next(420, 8),
+ on.next(470, 9),
+ on.completed(600)
});
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
@@ -78,16 +78,16 @@ SCENARIO("window count, inner timings", "[window][operators]"){
const rxsc::test::messages<rx::observable<int>> o_on;
auto xs = sc.make_hot_observable({
- on.on_next(100, 1),
- on.on_next(210, 2),
- on.on_next(240, 3),
- on.on_next(280, 4),
- on.on_next(320, 5),
- on.on_next(350, 6),
- on.on_next(380, 7),
- on.on_next(420, 8),
- on.on_next(470, 9),
- on.on_completed(600)
+ on.next(100, 1),
+ on.next(210, 2),
+ on.next(240, 3),
+ on.next(280, 4),
+ on.next(320, 5),
+ on.next(350, 6),
+ on.next(380, 7),
+ on.next(420, 8),
+ on.next(470, 9),
+ on.completed(600)
});
WHEN("group each int with the next 2 ints"){
@@ -126,10 +126,10 @@ SCENARIO("window count, inner timings", "[window][operators]"){
THEN("the 1st output window contains ints"){
auto required = rxu::to_vector({
- on.on_next(210, 2),
- on.on_next(240, 3),
- on.on_next(280, 4),
- on.on_completed(280)
+ on.next(210, 2),
+ on.next(240, 3),
+ on.next(280, 4),
+ on.completed(280)
});
auto actual = observers[0].messages();
REQUIRE(required == actual);
@@ -137,10 +137,10 @@ SCENARIO("window count, inner timings", "[window][operators]"){
THEN("the 2nd output window contains ints"){
auto required = rxu::to_vector({
- on.on_next(280, 4),
- on.on_next(320, 5),
- on.on_next(350, 6),
- on.on_completed(350)
+ on.next(280, 4),
+ on.next(320, 5),
+ on.next(350, 6),
+ on.completed(350)
});
auto actual = observers[1].messages();
REQUIRE(required == actual);
@@ -148,10 +148,10 @@ SCENARIO("window count, inner timings", "[window][operators]"){
THEN("the 3rd output window contains ints"){
auto required = rxu::to_vector({
- on.on_next(350, 6),
- on.on_next(380, 7),
- on.on_next(420, 8),
- on.on_completed(420)
+ on.next(350, 6),
+ on.next(380, 7),
+ on.next(420, 8),
+ on.completed(420)
});
auto actual = observers[2].messages();
REQUIRE(required == actual);
@@ -159,9 +159,9 @@ SCENARIO("window count, inner timings", "[window][operators]"){
THEN("the 4th output window contains ints"){
auto required = rxu::to_vector({
- on.on_next(420, 8),
- on.on_next(470, 9),
- on.on_completed(600)
+ on.next(420, 8),
+ on.next(470, 9),
+ on.completed(600)
});
auto actual = observers[3].messages();
REQUIRE(required == actual);
@@ -169,7 +169,7 @@ SCENARIO("window count, inner timings", "[window][operators]"){
THEN("the 5th output window only contains complete message"){
auto required = rxu::to_vector({
- on.on_completed(600)
+ on.completed(600)
});
auto actual = observers[4].messages();
REQUIRE(required == actual);
@@ -194,16 +194,16 @@ SCENARIO("window count, dispose", "[window][operators]"){
const rxsc::test::messages<rx::observable<int>> o_on;
auto xs = sc.make_hot_observable({
- on.on_next(100, 1),
- on.on_next(210, 2),
- on.on_next(240, 3),
- on.on_next(280, 4),
- on.on_next(320, 5),
- on.on_next(350, 6),
- on.on_next(380, 7),
- on.on_next(420, 8),
- on.on_next(470, 9),
- on.on_completed(600)
+ on.next(100, 1),
+ on.next(210, 2),
+ on.next(240, 3),
+ on.next(280, 4),
+ on.next(320, 5),
+ on.next(350, 6),
+ on.next(380, 7),
+ on.next(420, 8),
+ on.next(470, 9),
+ on.completed(600)
});
WHEN("group each int with the next 2 ints"){
@@ -220,13 +220,13 @@ SCENARIO("window count, dispose", "[window][operators]"){
THEN("the output contains merged groups of ints"){
auto required = rxu::to_vector({
- on.on_next(210, 2),
- on.on_next(240, 3),
- on.on_next(280, 4),
- on.on_next(280, 4),
- on.on_next(320, 5),
- on.on_next(350, 6),
- on.on_next(350, 6)
+ on.next(210, 2),
+ on.next(240, 3),
+ on.next(280, 4),
+ on.next(280, 4),
+ on.next(320, 5),
+ on.next(350, 6),
+ on.next(350, 6)
});
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
@@ -253,16 +253,16 @@ SCENARIO("window count, error", "[window][operators]"){
std::runtime_error ex("window on_error from source");
auto xs = sc.make_hot_observable({
- on.on_next(100, 1),
- on.on_next(210, 2),
- on.on_next(240, 3),
- on.on_next(280, 4),
- on.on_next(320, 5),
- on.on_next(350, 6),
- on.on_next(380, 7),
- on.on_next(420, 8),
- on.on_next(470, 9),
- on.on_error(600, ex)
+ on.next(100, 1),
+ on.next(210, 2),
+ on.next(240, 3),
+ on.next(280, 4),
+ on.next(320, 5),
+ on.next(350, 6),
+ on.next(380, 7),
+ on.next(420, 8),
+ on.next(470, 9),
+ on.error(600, ex)
});
WHEN("group each int with the next 2 ints"){
@@ -278,18 +278,18 @@ SCENARIO("window count, error", "[window][operators]"){
THEN("the output contains merged groups of ints"){
auto required = rxu::to_vector({
- on.on_next(210, 2),
- on.on_next(240, 3),
- on.on_next(280, 4),
- on.on_next(280, 4),
- on.on_next(320, 5),
- on.on_next(350, 6),
- on.on_next(350, 6),
- on.on_next(380, 7),
- on.on_next(420, 8),
- on.on_next(420, 8),
- on.on_next(470, 9),
- on.on_error(600, ex)
+ on.next(210, 2),
+ on.next(240, 3),
+ on.next(280, 4),
+ on.next(280, 4),
+ on.next(320, 5),
+ on.next(350, 6),
+ on.next(350, 6),
+ on.next(380, 7),
+ on.next(420, 8),
+ on.next(420, 8),
+ on.next(470, 9),
+ on.error(600, ex)
});
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
diff --git a/Rx/v2/test/sources/create.cpp b/Rx/v2/test/sources/create.cpp
index 063ff7e..44dcc30 100644
--- a/Rx/v2/test/sources/create.cpp
+++ b/Rx/v2/test/sources/create.cpp
@@ -31,8 +31,8 @@ SCENARIO("create stops on completion", "[create][sources]"){
THEN("the output contains all items"){
auto required = rxu::to_vector({
- on.on_next(200, 1),
- on.on_next(200, 2)
+ on.next(200, 1),
+ on.next(200, 2)
});
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
diff --git a/Rx/v2/test/sources/defer.cpp b/Rx/v2/test/sources/defer.cpp
index e9e62c2..79f8c91 100644
--- a/Rx/v2/test/sources/defer.cpp
+++ b/Rx/v2/test/sources/defer.cpp
@@ -30,8 +30,8 @@ SCENARIO("defer stops on completion", "[defer][sources]"){
[&](){
invoked++;
xs.reset(sc.make_cold_observable({
- on.on_next(100, sc.clock()),
- on.on_completed(200)
+ on.next(100, sc.clock()),
+ on.completed(200)
}));
return xs.get();
})
@@ -42,8 +42,8 @@ SCENARIO("defer stops on completion", "[defer][sources]"){
THEN("the output stops on completion"){
auto required = rxu::to_vector({
- on.on_next(300, 200L),
- on.on_completed(400)
+ on.next(300, 200L),
+ on.completed(400)
});
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
diff --git a/Rx/v2/test/sources/scope.cpp b/Rx/v2/test/sources/scope.cpp
index b8d36cb..cca805d 100644
--- a/Rx/v2/test/sources/scope.cpp
+++ b/Rx/v2/test/sources/scope.cpp
@@ -30,10 +30,10 @@ SCENARIO("scope, cold observable", "[scope][sources]"){
int time = 10;
auto values = r.get();
std::for_each(values.begin(), values.end(), [&](int &v){
- msg.push_back(on.on_next(time, v));
+ msg.push_back(on.next(time, v));
time += 10;
});
- msg.push_back(on.on_completed(time));
+ msg.push_back(on.completed(time));
xs.reset(sc.make_cold_observable(msg));
return xs.get();
}
@@ -45,12 +45,12 @@ SCENARIO("scope, cold observable", "[scope][sources]"){
THEN("the output stops on completion"){
auto required = rxu::to_vector({
- on.on_next(210, 1),
- on.on_next(220, 2),
- on.on_next(230, 3),
- on.on_next(240, 4),
- on.on_next(250, 5),
- on.on_completed(260)
+ on.next(210, 1),
+ on.next(220, 2),
+ on.next(230, 3),
+ on.next(240, 4),
+ on.next(250, 5),
+ on.completed(260)
});
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
@@ -91,10 +91,10 @@ SCENARIO("scope, hot observable", "[scope][sources]"){
int time = 210;
auto values = r.get();
std::for_each(values.begin(), values.end(), [&](int &v){
- msg.push_back(on.on_next(time, v));
+ msg.push_back(on.next(time, v));
time += 10;
});
- msg.push_back(on.on_completed(time));
+ msg.push_back(on.completed(time));
xs.reset(sc.make_hot_observable(msg));
return xs.get();
}
@@ -106,12 +106,12 @@ SCENARIO("scope, hot observable", "[scope][sources]"){
THEN("the output stops on completion"){
auto required = rxu::to_vector({
- on.on_next(210, 1),
- on.on_next(220, 2),
- on.on_next(230, 3),
- on.on_next(240, 4),
- on.on_next(250, 5),
- on.on_completed(260)
+ on.next(210, 1),
+ on.next(220, 2),
+ on.next(230, 3),
+ on.next(240, 4),
+ on.next(250, 5),
+ on.completed(260)
});
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
@@ -154,8 +154,8 @@ SCENARIO("scope, complete", "[scope][sources]"){
[&](resource r){
++observable_factory_invoked;
xs.reset(sc.make_cold_observable(rxu::to_vector({
- on.on_next(100, r.get()),
- on.on_completed(200)
+ on.next(100, r.get()),
+ on.completed(200)
})));
return xs.get();
}
@@ -175,8 +175,8 @@ SCENARIO("scope, complete", "[scope][sources]"){
THEN("the output stops on completion"){
auto required = rxu::to_vector({
- on.on_next(300, 200),
- on.on_completed(400)
+ on.next(300, 200),
+ on.completed(400)
});
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
@@ -221,8 +221,8 @@ SCENARIO("scope, error", "[scope][sources]"){
[&](resource r){
++observable_factory_invoked;
xs.reset(sc.make_cold_observable(rxu::to_vector({
- on.on_next(100, r.get()),
- on.on_error(200, ex)
+ on.next(100, r.get()),
+ on.error(200, ex)
})));
return xs.get();
}
@@ -242,8 +242,8 @@ SCENARIO("scope, error", "[scope][sources]"){
THEN("the output stops on error"){
auto required = rxu::to_vector({
- on.on_next(300, 200),
- on.on_error(400, ex)
+ on.next(300, 200),
+ on.error(400, ex)
});
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
@@ -286,8 +286,8 @@ SCENARIO("scope, dispose", "[scope][sources]"){
[&](resource r){
++observable_factory_invoked;
xs.reset(sc.make_cold_observable(rxu::to_vector({
- on.on_next(100, r.get()),
- on.on_next(1000, r.get() + 1)
+ on.next(100, r.get()),
+ on.next(1000, r.get() + 1)
})));
return xs.get();
}
@@ -307,7 +307,7 @@ SCENARIO("scope, dispose", "[scope][sources]"){
THEN("the output contains resulting ints"){
auto required = rxu::to_vector({
- on.on_next(300, 200)
+ on.next(300, 200)
});
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
@@ -368,7 +368,7 @@ SCENARIO("scope, throw resource selector", "[scope][sources]"){
THEN("the output stops on error"){
auto required = rxu::to_vector({
- on.on_error(200, ex)
+ on.error(200, ex)
});
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
@@ -421,7 +421,7 @@ SCENARIO("scope, throw resource usage", "[scope][sources]"){
THEN("the output stops on error"){
auto required = rxu::to_vector({
- on.on_error(200, ex)
+ on.error(200, ex)
});
auto actual = res.get_observer().messages();
REQUIRE(required == actual);
diff --git a/Rx/v2/test/subjects/subject.cpp b/Rx/v2/test/subjects/subject.cpp
index ea2230a..dd097d8 100644
--- a/Rx/v2/test/subjects/subject.cpp
+++ b/Rx/v2/test/subjects/subject.cpp
@@ -441,18 +441,18 @@ SCENARIO("subject - infinite source", "[subject][subjects]"){
const rxsc::test::messages<int> on;
auto xs = sc.make_hot_observable({
- on.on_next(70, 1),
- on.on_next(110, 2),
- on.on_next(220, 3),
- on.on_next(270, 4),
- on.on_next(340, 5),
- on.on_next(410, 6),
- on.on_next(520, 7),
- on.on_next(630, 8),
- on.on_next(710, 9),
- on.on_next(870, 10),
- on.on_next(940, 11),
- on.on_next(1020, 12)
+ on.next(70, 1),
+ on.next(110, 2),
+ on.next(220, 3),
+ on.next(270, 4),
+ on.next(340, 5),
+ on.next(410, 6),
+ on.next(520, 7),
+ on.next(630, 8),
+ on.next(710, 9),
+ on.next(870, 10),
+ on.next(940, 11),
+ on.next(1020, 12)
});
rxsub::subject<int> s;
@@ -494,9 +494,9 @@ SCENARIO("subject - infinite source", "[subject][subjects]"){
THEN("result1 contains expected messages"){
auto required = rxu::to_vector({
- on.on_next(340, 5),
- on.on_next(410, 6),
- on.on_next(520, 7)
+ on.next(340, 5),
+ on.next(410, 6),
+ on.next(520, 7)
});
auto actual = results1.get_observer().messages();
REQUIRE(required == actual);
@@ -504,9 +504,9 @@ SCENARIO("subject - infinite source", "[subject][subjects]"){
THEN("result2 contains expected messages"){
auto required = rxu::to_vector({
- on.on_next(410, 6),
- on.on_next(520, 7),
- on.on_next(630, 8)
+ on.next(410, 6),
+ on.next(520, 7),
+ on.next(630, 8)
});
auto actual = results2.get_observer().messages();
REQUIRE(required == actual);
@@ -514,7 +514,7 @@ SCENARIO("subject - infinite source", "[subject][subjects]"){
THEN("result3 contains expected messages"){
auto required = rxu::to_vector({
- on.on_next(940, 11)
+ on.next(940, 11)
});
auto actual = results3.get_observer().messages();
REQUIRE(required == actual);
@@ -532,17 +532,17 @@ SCENARIO("subject - finite source", "[subject][subjects]"){
const rxsc::test::messages<int> on;
auto xs = sc.make_hot_observable({
- on.on_next(70, 1),
- on.on_next(110, 2),
- on.on_next(220, 3),
- on.on_next(270, 4),
- on.on_next(340, 5),
- on.on_next(410, 6),
- on.on_next(520, 7),
- on.on_completed(630),
- on.on_next(640, 9),
- on.on_completed(650),
- on.on_error(660, std::runtime_error("error on unsubscribed stream"))
+ on.next(70, 1),
+ on.next(110, 2),
+ on.next(220, 3),
+ on.next(270, 4),
+ on.next(340, 5),
+ on.next(410, 6),
+ on.next(520, 7),
+ on.completed(630),
+ on.next(640, 9),
+ on.completed(650),
+ on.error(660, std::runtime_error("error on unsubscribed stream"))
});
rxsub::subject<int> s;
@@ -584,9 +584,9 @@ SCENARIO("subject - finite source", "[subject][subjects]"){
THEN("result1 contains expected messages"){
auto required = rxu::to_vector({
- on.on_next(340, 5),
- on.on_next(410, 6),
- on.on_next(520, 7)
+ on.next(340, 5),
+ on.next(410, 6),
+ on.next(520, 7)
});
auto actual = results1.get_observer().messages();
REQUIRE(required == actual);
@@ -594,9 +594,9 @@ SCENARIO("subject - finite source", "[subject][subjects]"){
THEN("result2 contains expected messages"){
auto required = rxu::to_vector({
- on.on_next(410, 6),
- on.on_next(520, 7),
- on.on_completed(630)
+ on.next(410, 6),
+ on.next(520, 7),
+ on.completed(630)
});
auto actual = results2.get_observer().messages();
REQUIRE(required == actual);
@@ -604,7 +604,7 @@ SCENARIO("subject - finite source", "[subject][subjects]"){
THEN("result3 contains expected messages"){
auto required = rxu::to_vector({
- on.on_completed(900)
+ on.completed(900)
});
auto actual = results3.get_observer().messages();
REQUIRE(required == actual);
@@ -625,17 +625,17 @@ SCENARIO("subject - on_error in source", "[subject][subjects]"){
std::runtime_error ex("subject on_error in stream");
auto xs = sc.make_hot_observable({
- on.on_next(70, 1),
- on.on_next(110, 2),
- on.on_next(220, 3),
- on.on_next(270, 4),
- on.on_next(340, 5),
- on.on_next(410, 6),
- on.on_next(520, 7),
- on.on_error(630, ex),
- on.on_next(640, 9),
- on.on_completed(650),
- on.on_error(660, std::runtime_error("error on unsubscribed stream"))
+ on.next(70, 1),
+ on.next(110, 2),
+ on.next(220, 3),
+ on.next(270, 4),
+ on.next(340, 5),
+ on.next(410, 6),
+ on.next(520, 7),
+ on.error(630, ex),
+ on.next(640, 9),
+ on.completed(650),
+ on.error(660, std::runtime_error("error on unsubscribed stream"))
});
rxsub::subject<int> s;
@@ -677,9 +677,9 @@ SCENARIO("subject - on_error in source", "[subject][subjects]"){
THEN("result1 contains expected messages"){
auto required = rxu::to_vector({
- on.on_next(340, 5),
- on.on_next(410, 6),
- on.on_next(520, 7)
+ on.next(340, 5),
+ on.next(410, 6),
+ on.next(520, 7)
});
auto actual = results1.get_observer().messages();
REQUIRE(required == actual);
@@ -687,9 +687,9 @@ SCENARIO("subject - on_error in source", "[subject][subjects]"){
THEN("result2 contains expected messages"){
auto required = rxu::to_vector({
- on.on_next(410, 6),
- on.on_next(520, 7),
- on.on_error(630, ex)
+ on.next(410, 6),
+ on.next(520, 7),
+ on.error(630, ex)
});
auto actual = results2.get_observer().messages();
REQUIRE(required == actual);
@@ -697,7 +697,7 @@ SCENARIO("subject - on_error in source", "[subject][subjects]"){
THEN("result3 contains expected messages"){
auto required = rxu::to_vector({
- on.on_error(900, ex)
+ on.error(900, ex)
});
auto actual = results3.get_observer().messages();
REQUIRE(required == actual);