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

Possibility to check if one of orthogonal states is as expected #353

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

pborzecki
Copy link

The idea is to have possibility to test orthogonal states independently. I.E. for testing purposes.

@pborzecki pborzecki force-pushed the master branch 3 times, most recently from 462fbf7 to d4f1baa Compare June 30, 2020 10:18
@@ -1703,6 +1703,23 @@ class sm {
});
return result;
}
template <class T = aux::identity<sm_t>, class TState>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems like a nice utility 👍 I don't think is required to be part of the sml core, it can be just a free function in the examples or extensions instead as it's implemented using visit_current_states

}
});
return result;
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests to verify the behaviour will prevent breaking the functionality in the future ✅

@@ -1703,6 +1703,23 @@ class sm {
});
return result;
}
template <class T = aux::identity<sm_t>, class TState>
bool is_one_of_current_states_as(const TState&) const {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sml.hpp should not be changed directly as it's a generated file using tools/pph.sh

@rhard
Copy link

rhard commented Nov 25, 2021

@pborzecki @krzysztof-jusiak If the utility could not be a part of the distribution, could you help me how to convert it to the standalone function. Just tried different approaches, but without success. Unfortunately, I'm not fit in the metaprogramming. A little example would be very useful.

@guiserle
Copy link
Contributor

guiserle commented Dec 2, 2021

Actually, this should be the behavior of is<TState> according to user guide. More info can be seen on #481

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.

None yet

4 participants