blob: 395661ba18afc8286b3bfe303b488c24c9ad7895 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
#include "rxcpp/rx.hpp"
#include "rxcpp/rx-test.hpp"
#include "catch.hpp"
SCENARIO("defer sample"){
printf("//! [defer sample]\n");
auto observable_factory = [](){return rxcpp::observable<>::range(1, 3);};
auto values = rxcpp::observable<>::defer(observable_factory);
values.
subscribe(
[](int v){printf("OnNext: %d\n", v);},
[](){printf("OnCompleted\n");});
printf("//! [defer sample]\n");
}
|