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