Closed modocache closed 9 years ago
https://github.com/jeffh/PBT/blob/master/PBTSpecs/Public/Generators/PBTFiniteStateMachineSpec.mm
You conform to the PBTStateTransition
Protocol for each state transition. It's not as elegant as erlang, but it is functional. See PBTQueueRemoveTransition.
Also: concurrent & async state machine test generators are currently not implemented.
Ah! Gotcha. Silly me, I thought the "custom transition" in the README was made as some sort of convenience, not as the primary means by which to implement stateful testing. I'll take a harder look at PBTStateTransition
, and PBTQueueRemoveTransition
in particular.
Thanks a million! :tophat:
If you happen to figure out a better way to succinctly describe transitions without defining a new class as opposed to my lousy PBTTransition. I'd love a PR.
Around the 4'00" mark of this video on QuickCheck, John Hughes demonstrates testing the state of a queue, complete with pre-conditions and post-conditions. How would I model such a thing in PBT?