• 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("full start_with sample"){
7     printf("//! [full start_with sample]\n");
8     auto observable = rxcpp::observable<>::range(10, 12);
9     auto values = rxcpp::observable<>::start_with(observable, 1, 2, 3);
10     values.
11         subscribe(
__anon8a88ee7a0102(int v)12             [](int v){printf("OnNext: %d\n", v);},
__anon8a88ee7a0202()13             [](){printf("OnCompleted\n");});
14     printf("//! [full start_with sample]\n");
15 }
16 
17 SCENARIO("short start_with sample"){
18     printf("//! [short start_with sample]\n");
19     auto values = rxcpp::observable<>::range(10, 12).
20         start_with(1, 2, 3);
21     values.
22         subscribe(
__anon8a88ee7a0302(int v)23             [](int v){printf("OnNext: %d\n", v);},
__anon8a88ee7a0402()24             [](){printf("OnCompleted\n");});
25     printf("//! [short start_with sample]\n");
26 }
27