• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #include "rxcpp/rx.hpp"
2 
3 #include "rxcpp/rx-test.hpp"
4 #include "catch.hpp"
5 
6 SCENARIO("take_while sample"){
7     printf("//! [take_while sample]\n");
8     auto values = rxcpp::observable<>::range(1, 8).
__anon7c57594c0102(int v)9         take_while([](int v){
10             return v <= 4;
11         });
12     values.
13         subscribe(
__anon7c57594c0202(int v)14             [](int v){printf("OnNext: %d\n", v);},
__anon7c57594c0302()15             [](){printf("OnCompleted\n");});
16     printf("//! [take_while sample]\n");
17 }