Re: [Vala] Any xUnit framework for Vala?



Correct, something like this. GroovyTestCase itself is based on jUnit
(de-facto standard unit framework in java world).

There is a test framework in Glib already
http://library.gnome.org/devel/glib/unstable/glib-Testing.html and IMO
the best of all is to adopt it for Vala. There are at least 2 thing
have to be done:
 - add vapi bindings for these methods
 - add documentation/examples that shows how to use tests with
make/autotools/cmake in your project

Let me answer to my question: binding for GLib testing framework
actually exist in Vala. They are just hidden. I did not find any
examples of unit tests for a Vala app, so I created such example by
myself [1] with its description [2].

I would say tests in GLib are slightly different from tests in java.
In GLib/Vala unit tests are simple programs that you compile the same
way as any other binaries. 'make' runs those programs and check its
exit code.

1) https://github.com/anatol/vala-sample/
2) http://pomozok.wordpress.com/2011/01/02/vala-autotools-example/



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