Hi everybody,

I have made some unit tests for the program counter machinery today. You
can find them here:

  http://hg.viff.dk/viff/file/tip/viff/test/test_basic_runtime.py

Some of you (Tord, Thomas, Mikkel, and others?) have asked me to explain
exactly how these counters work, and I hope this helps with that.

These unit tests serve as both regression tests, but also as useful
documentation. I find that writing unit tests is a good way to learn how
VIFF works. These tests were just some simple ones I could think of --
if any of you have better ideas and want to expand on these tests it
would be very helpful!

Quick Trial tutorial: implement a new method named test_foo that takes
self and a runtime argument. Decorate it with protocol. Now run

  trial viff.test.test_basic_runtime

to execute just this file. Repeat until every aspect of program counters
is covered! :-)

You will find the Trial API documentation with a list of possible
assertions here:

  
http://twistedmatrix.com/documents/current/api/twisted.trial.unittest._Assertions.html

-- 
Martin Geisler
_______________________________________________
viff-devel mailing list (http://viff.dk/)
[email protected]
http://lists.viff.dk/listinfo.cgi/viff-devel-viff.dk

Reply via email to