Quoting Mathieu Bouchard matju@artengine.ca:
On Sun, 23 Dec 2007, Hans-Christoph Steiner wrote:
e.g. "fail_blabla" will only success if it returns the state "FAIL" immediately or after a "WAIT".
In a binary system, anything that doesn't success would be a
failure. I don't quite get the WAIT state. Do you have an example
of where to use that?In most tristate electronics, the third state is WAIT, but in Pd, you normally do that by not sending a message: if as binary you'd send a 0 or 1 while running a certain method, and want to introduce a WAIT state, you'd make it not output anything at first, introduce proper [delay], and only later send a 0 or 1 when it's ready. It's as simple as that. If the answer is not going to come, an explicit "wait" message isn't going to disambiguate nor solve that, so it might be a good idea to put some timeout protection *outside* of the tests themselves.
again, this suggestion is based on practical experiences with tests. my first iteration of the framework did it exactly like you just proposed.
in practice i found it often simpler to write tests that only output a
result when they know that they have passed: you need to create far
less logic, which might minimize the chance to write buggy tests
(which i found is inevitable)
likewise, it is often simple to have a shortcut to tell the framework
that the test is known to have failed (most of these shortcuts could
be avoided by splitting the test into several sub-tests; in practice i
found that i prefer to write less tests)
apart from that, a mechanism to quit a test from outside after some
timeout might be a good idea.
fgmad.r IOhannes
This message was sent using IMP, the Internet Messaging Program.