diff --git a/test/ft/actions_process.cpp b/test/ft/actions_process.cpp index 90f9dd2f..f71df9d3 100644 --- a/test/ft/actions_process.cpp +++ b/test/ft/actions_process.cpp @@ -108,6 +108,41 @@ test process_event_from_substate = [] { expect(1 == c_.a_called); }; +test back_process_event_from_substate = [] { + struct sub { + auto operator()() const noexcept { + using namespace sml; + auto back_process = [](back::process process) { process(e2{}); }; + // clang-format off + return make_transition_table( + * s1 + event / (back_process, process(e3{})) + , X + event = X // BUG: event not known otherwise + ); + // clang-format on + } + }; + + struct c { + auto operator()() noexcept { + using namespace sml; + // clang-format off + return make_transition_table( + * state + event / [this] { received += "e2|"; } + , state + event / [this] { received += "e3|"; } + ); + // clang-format on + } + + std::string received; + }; + + sml::sm> sm; + sm.process_event(e1{}); + + const c& c_ = sm; + expect(c_.received == "e2|e3|"); // BUG: only e3 is received +}; + test queue_process_events = [] { struct c { std::vector calls;