Re: RFC: GLib testing framework



Hello Tim,

I have found that a good way to write tests, is to write them in
Python. Almost all libraries (and certainly all in the GNOME platform)
has Python bindings, so it doesn't matter if you use C or Python to
write your tests. In fact, writing the tests in Python should be
beneficial because the bindings only exposes the public api so you are
prevented from referencing internals.

There are a few unit testing frameworks for Python, nosetest (my
favorite), PyUnit, py.tst and many more. They all fulfill the
requirements you listed and are much faster to use because there is no
compilation involved. Running individual tests is a piece of cake. And
of course, since the tests are written in Python they are about 100
times easier to implement and maintain.

YMMV of course. But even if there is a need for a test framework
written in pure C, does it really have to be placed in libglib.so? For
other languages than C that test framework is dead weight since they
already have better solutions.


-- 
mvh Björn


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]