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