bug


Description:

[ Version ( since = "2.16" ) ]
public void bug (string bug_uri_snippet)

This function adds a message to test reports that associates a bug URI with a test case.

Note:

See also: summary

Bug URIs are constructed from a base URI set with bug_base and bug_uri_snippet. If bug_base has not been called, it is assumed to be the empty string, so a full URI can be provided to bug instead.

Since GLib 2.70, the base URI is not prepended to bug_uri_snippet if it is already a valid URI.

Example: Bug tracker integration:

public static int main (string[] args) {
Test.init (ref args);
Test.bug_base ("http://bugzilla.gnome.org/");

Test.add_func ("/libvaladoc/driver-0.12.x", () => {
// Output: ``(MSG: Bug Reference: http://bugzilla.gnome.org/504142)``
// Only visible with ./test --verbose!
Test.bug ("504142");
});

Test.run ();
return 0;
}

valac --pkg glib-2.0 GLib.Test.bug.vala

./GLib.Test.bug --verbose

Parameters:

bug_uri_snippet

Bug specific bug tracker URI or URI portion.


Namespace: GLib.Test
Package: glib-2.0