-
Notifications
You must be signed in to change notification settings - Fork 179
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
base: master
Are you sure you want to change the base?
Conversation
462fbf7
to
d4f1baa
Compare
@@ -1703,6 +1703,23 @@ class sm { | |||
}); | |||
return result; | |||
} | |||
template <class T = aux::identity<sm_t>, class TState> |
There was a problem hiding this comment.
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; | ||
} |
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
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
@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. |
Actually, this should be the behavior of |
The idea is to have possibility to test orthogonal states independently. I.E. for testing purposes.