Testing timed automata

12 views
Skip to first unread message

dabd

unread,
Feb 19, 2016, 5:39:02 AM2/19/16
to scalacheck
How do you go about testing timed automata using scalacheck?
A simple example of a timed automaton is a light switch with a button that if you press once will light up, but if you press it twice quickly, it will light up with a brighter light.

Martin Mauch

unread,
Feb 29, 2016, 1:57:54 PM2/29/16
to scalacheck
Do you mean how to explicitly deal with time in Scalacheck?
I guess there isn't something in-built, but you could have a look at stateful testing:
You could start out like the counter example but incorporate the time of the last press into the State type and then calculate the next state by checking how long ago the last press was.
Reply all
Reply to author
Forward
0 new messages