Hello, thank you for all your work on this library.
I'm not sure how to write virtual_time-tests for objects that use RxCpp internally and rely on a run_loop in production.
My current approach is:
auto time = std::make_shared<rxcpp::schedulers::detail::test_type>()
->create_test_type_worker_interface();
rxcpp::schedulers::detail::action_queue::ensure(time);
... create things, test initial state ...
time->advance_by(1000);
... test changed state ...
This doesn't work out of the box because the virtual time isn't used to schedule new work.
Is the following change reasonable? (Maybe with an "#ifdef RXCPP_TESTING" guard to opt-in?)
Hello, thank you for all your work on this library.
I'm not sure how to write virtual_time-tests for objects that use RxCpp internally and rely on a run_loop in production.
My current approach is:
This doesn't work out of the box because the virtual time isn't used to schedule new work. Is the following change reasonable? (Maybe with an "#ifdef RXCPP_TESTING" guard to opt-in?)
Can you suggest a better approach?