Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adapted policies_logging.cpp tests to correctly handle statemachine start #612

Merged
merged 1 commit into from
Mar 4, 2024

Conversation

devzeb
Copy link
Contributor

@devzeb devzeb commented Mar 4, 2024

Problem:

While testing some logging behaviors, I noticed that the tests for logging were disabled in cmake.
The tests did not correctly handle the current implementation of sml_impl::start (sml.hpp, line 1501).

  template <class TDeps, class TSubs>
  constexpr void start(TDeps &deps, TSubs &subs) {
    process_event(on_entry<_, initial>{}, deps, subs);
  }

This code causes the sm to process the initial on_entry event, which then correctly invokes the logger for that event.
However, the test file policies_logging.cpp did not consider the log message of that initial entry event and therefore failed.

Solution:

  • added log messages of the initial on_entry event to the vector of expected message
  • re-enabled the tests in cmake

@kris-jusiak kris-jusiak merged commit 78e0640 into boost-ext:master Mar 4, 2024
5 checks passed
@kris-jusiak
Copy link
Collaborator

Thank you @devzeb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants