Re: [Vala] GTest



I'm sure this isn't for everyone, but I've been using Valar
(http://github.com/danlucraft/valar/tree/master) to generate Ruby
bindings for my Vala library, and then using RSpec to test it.

Example of vala code under test:
      http://github.com/danlucraft/gtkmateview/tree/master/lib/range_set.vala
Example of RSpec test code:
      http://github.com/danlucraft/gtkmateview/tree/master/spec/range_set_spec.rb

There is no other configuration needed as the bindings from RangeSet
to Ruby are generated automatically as part of the build process. This
makes development fairly seamless.

If anyone wants to get this working I can provide an example build
script (there is little documentation).

best,
Dan

___________________________
Daniel Lucraft
http://www.daniellucraft.com/



2008/10/27 Ali Sabil <ali sabil gmail com>:
Hi,

In the People[1] project we also have been looking into a better unit
testing framework for Vala, we had various attempts with vunit, and then
vtest, but both of them were not as good as we wanted. We ended up cooking a
very simple unit testing framework, that we called "test-it"[2], and that's
what we are using now for unit testing People.

The main feature of test-it is the ability to test asynchronous code pretty
easily. Also few weeks ago, I wanted to collect all the small helper
libraries we have been working on into what would constitute the basis of a
Class library for Vala, into a project I call for now "corelib" [3]. Inside
corelib you will find for now a copy of test-it, renamed into core-trial, as
well as a higher level Xml document processing library (with basic XPath
support) named core-xml.

[1] https://launchpad.net/people-project
[2]
http://bazaar.launchpad.net/~people-project/people-project/people-trunk/files/336?file_id=libselftest-20080124204154-1zhk1kfdbahsx11p-1
[3] https://code.launchpad.net/~asabil/+junk/corelib

--
Ali



On Sun, Oct 26, 2008 at 4:08 PM, Frederik <scumm_fredo gmx net> wrote:

Maciej Piechotka wrote:

Is there any samples how to use GTest?

Best regards

Hi,

I haven't even found any C samples, and some macro bindings seem to be
missing in the vapi. But I have discovered VUnit of the People Project:

https://code.launchpad.net/~jprieur/people-project/vunit

This seems to be more object oriented than the GLib testing suite. I
would like to see this as a standalone library like libgee. I'm highly
interested in an official unit testing framework for Vala, which
would make testing as easy as possible.

Such a library could also provide a graphical GTK+ test runner tool or
widget, like the one of GUnit [1] [2], that could get embedded into Vala
IDEs like Val(a)IDE.

Regards,

Frederik

[1] http://personal.inet.fi/koti/peter.hagg/gunit/
[2] http://pvanhoof.be/files/tny-test-suite.png
_______________________________________________
Vala-list mailing list
Vala-list gnome org
http://mail.gnome.org/mailman/listinfo/vala-list


_______________________________________________
Vala-list mailing list
Vala-list gnome org
http://mail.gnome.org/mailman/listinfo/vala-list





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