Allow test fixtures and test methods to throw errors by default.

* test/testcase.vala (TestCase): Add a generic throws clause to both
  TestMethod and set_up and tear_down, update subclasses.
This commit is contained in:
Michael James Gratton 2018-03-07 17:30:14 +11:00
parent 6b24e07e56
commit 50f73ff252
27 changed files with 168 additions and 155 deletions

View file

@ -13,7 +13,7 @@ public class ClientWebViewTest : Gee.TestCase {
add_test("load_resources", load_resources);
}
public void init_web_context() {
public void init_web_context() throws Error {
Configuration config = new Configuration(GearyApplication.APP_ID);
ClientWebView.init_web_context(
config,
@ -23,7 +23,7 @@ public class ClientWebViewTest : Gee.TestCase {
);
}
public void load_resources() {
public void load_resources() throws Error {
try {
ClientWebView.load_scripts();
} catch (Error err) {