Commit 0fbdfc74 authored by Gauthier Quesnel's avatar Gauthier Quesnel
Browse files

core: update hsm simulation unit test

parent 7e84e554
Pipeline #66469 passed with stage
in 2 minutes and 15 seconds
......@@ -1681,23 +1681,21 @@ int main()
auto& hsm = sim.alloc<irt::hsm_wrapper>();
auto* hsmw = sim.hsms.try_to_get(hsm.id);
expect((hsmw != nullptr) >> fatal);
hsmw->states.resize(2);
hsmw->states.resize(3);
hsmw->set_state(
0u, irt::hierarchical_state_machine::invalid_state_id, 1u);
hsmw->states[0u].input_changed_action.value_condition_1 = 3u;
hsmw->states[0u].input_changed_action.transition_1 = 1u;
hsmw->set_state(1u, 0u);
hsmw->states[1u].enter_action.type =
irt::hsm_wrapper::hsm::action_type_output;
hsmw->states[1u].enter_action.parameter_1 = 0u;
hsmw->states[1u].enter_action.parameter_2 = 1u;
hsmw->states[1u].input_changed_action.value_condition_1 = 3u;
hsmw->states[1u].input_changed_action.value_mask_1 = 7u;
hsmw->states[1u].input_changed_action.transition_1 = 2u;
hsmw->states[1u].enter_action.type =
hsmw->set_state(2u, 0u);
hsmw->states[2u].enter_action.type =
irt::hsm_wrapper::hsm::action_type_output;
hsmw->states[1u].enter_action.parameter_1 = 0u;
hsmw->states[1u].enter_action.parameter_2 = 1u;
hsmw->states[2u].enter_action.parameter_1 = 0u;
hsmw->states[2u].enter_action.parameter_2 = 1u;
expect(sim.connect(gen, 0, hsm, 0) == irt::status::success);
expect(sim.connect(gen, 0, hsm, 1) == irt::status::success);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment