Commit 1dd63caa authored by Rico Tzschichholz's avatar Rico Tzschichholz

tests: Add asynchronous "catch-error-scope" regression test

See #741
parent 23e0df7f
......@@ -412,6 +412,7 @@ TESTS = \
asynchronous/bug792660.vala \
asynchronous/bug792942.vala \
asynchronous/bug793158.vala \
asynchronous/catch-error-scope.vala \
asynchronous/closures.vala \
asynchronous/generator.vala \
asynchronous/out-parameter-invalid.test \
......
errordomain FooError {
FAIL
}
async void foo () {
try {
throw new FooError.FAIL ("Foo");
} catch (GLib.Error e) {
assert (e is FooError);
assert (e.message == "Foo");
}
try {
throw new FooError.FAIL ("Bar");
} catch (GLib.Error e) {
assert (e is FooError);
assert (e.message == "Bar");
}
}
void main () {
var loop = new MainLoop ();
foo.begin ((o, res) => {
foo.end (res);
loop.quit ();
});
loop.run ();
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment