Re: bug test links (Re: RFC: GLib testing framework)



On Tue, Nov 06, 2007 at 09:14:31PM +0100, Tim Janik wrote:

> void	g_test_bugzilla (const gchar *bugzilla_url_prefix);
> void	g_test_bug      (guint        bugid);
> 
> g_test_bugzilla() if called outside a testcase will set the default
> bugzilla url for all test cases. if called inside a test case, it
> sets the bugzilla url for the scope of the case only.
> g_test_bug() can be called inside a testcase, and cause a #bugid
> link to appear in the test report.

I wouldn't hardcode the name (or specifics) of a BTS in the glib API.
Instead use something like:

  void  g_test_uri (const gchar *uri_template);
  void  g_test_bug (guint        bugid);

where the former function is used like this:

  g_test_uri("http://bugs.example.com/bugs/%s";);

Also it is better not to restrict bug "numbers" to integers. Other BTS
could possibly use other systems to identify bugs. Also, I don't see
the need to use arithmetic operations on bug numbers, so using a string
should be ok.

 - Sebastian



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