• 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("as_dynamic sample"){
7     printf("//! [as_dynamic sample]\n");
8     auto o1 = rxcpp::observable<>::range(1, 3);
9     auto o2 = rxcpp::observable<>::just(4);
10     auto o3 = rxcpp::observable<>::empty<int>();
11     auto values = o1.concat(o2, o3);
12     printf("type of o1:                  %s\n", typeid(o1).name());
13     printf("type of o1.as_dynamic():     %s\n", typeid(o1.as_dynamic()).name());
14     printf("type of o2:                  %s\n", typeid(o2).name());
15     printf("type of o2.as_dynamic():     %s\n", typeid(o2.as_dynamic()).name());
16     printf("type of o3:                  %s\n", typeid(o3).name());
17     printf("type of o3.as_dynamic():     %s\n", typeid(o3.as_dynamic()).name());
18     printf("type of values:              %s\n", typeid(values).name());
19     printf("type of values.as_dynamic(): %s\n", typeid(values.as_dynamic()).name());
20     printf("//! [as_dynamic sample]\n");
21 }
22