Re: RFC: GLib testing framework



On Nov 6, 2007 2:19 PM, Tim Janik <timj imendio com> wrote:
> On Tue, 6 Nov 2007, Matthias Clasen wrote:
>
> > On 11/1/07, Tim Janik <timj imendio com> wrote:
>
> > One thing I find pretty useful, that has not been mentioned so far (or
> > I missed it) is regression tests for bugs. For these it is very useful
> > to have some standardized way to refer to the bug they are testing.
>
> people can use any naming scheme they want, there's no dictate for that in
> the framework. e.g you could start to label your tests like this:
>
>    g_test_add_func ("/gtk/bug/4711", test_rand1);
>    g_test_add_func ("/gtk/bug/4712", test_assertions);
>    g_test_add_func ("/gtk/bug/1313", test_timer);


I was hoping for some way to associate bug numbers with test cases
that would allow
the report to contain a link to the bug.

> however if you want the value of 'foo' and 'bar' be printed out, instead
> of just the value of (foo > bar) which would be 0 or 1, then there are
> no other means than using something simialr to:
>    g_assert_cmpfloat (foo, >, bar);


Hmm, thats unfortunately true. Unless we want to go for something more
heavy-weight,
like

g_assert_with_message (foo > bar, "foo is not greateer than bar (%d >
%d)", foo, bar)


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