Example: Runs all tests under the toplevel suite

public static int main (string[] args) {
Test.init (ref args);

// Add some random test cases:
Test.add_func ("/libvaladoc/driver-0.12.x", () => {
// TODO: test
Test.fail ();
});
Test.add_func ("/libvaladoc/driver-0.12.x", () => {
// TODO: test
});
Test.add_func ("/libvaladoc/driver-0.12.x", () => {
// TODO: test
});

// Run all tests!
return Test.run ();
}

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

./GLib.Test.run --keep-going

See:




2022 vala-language.org