bool operator!=(const TTest& other) const { return not_equal_to(other, typename std::is_unsigned<T>::type()); }
auto xs = sc.make_hot_observable({ on.next(150, 1), on.next(210, 2), on.next(220, 3), on.next(230, 4), on.next(240, 5), on.completed(250) }); WHEN("values before 4 are taken"){ auto res = w.start( [xs]() { return xs .take_while(not_equal_to(4)) .as_dynamic(); } ); THEN("the output only contains items sent while subscribed"){ auto required = rxu::to_vector({ on.next(210, 2), on.next(220, 3), on.completed(230) }); auto actual = res.get_observer().messages(); REQUIRE(required == actual); } THEN("there was 1 subscription/unsubscription to the source"){