Replies: 1 comment
-
It's possible that what you are trying to do could be better expressed using You could also perhaps keep a single model and have your
Also, I don't understand why you would need different |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have experience with q-s-m, and I'm just starting with q-d. Let's say I have different frequency distributions for a couple of tests on the same state machine, depending on whether the SUT will be an on-disk implementation or an in-memory implementation.
In q-s-m, as
generator
is a function field of the state machine, we can provide arguments to it. This allows us to use the same test definition for different distributions of commands.In q-d, as
arbitraryAction
is a method ofStateModel
, it doesn't seem to be a way of providing this depending on what test we want to run. Is one forced now to define twoStateModel
instances with different generators on each? This is not ideal as we would have to replicate all the rest of the machinery. Maybe using a newtype wrapper over theModel
such that we forward all methods in the class to the ones of the realModel
except the generator? This looks like a lot of code, but perhaps it is the only way to do it? Notice one would have to replicateRunModel
too.Beta Was this translation helpful? Give feedback.
All reactions