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