From: Rico Tzschichholz Date: Tue, 22 Feb 2022 09:56:05 +0000 (+0100) Subject: tests: Add invalid "error creation" tests to increase coverage X-Git-Tag: 0.55.90~19 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ac9a2ae616675a30b079c9eb7c4002cfeb00adde;p=thirdparty%2Fvala.git tests: Add invalid "error creation" tests to increase coverage --- diff --git a/tests/Makefile.am b/tests/Makefile.am index 05bf52d1d..06043b4ed 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -677,6 +677,8 @@ TESTS = \ errors/default-gtype.vala \ errors/delegate-throws-error-code.vala \ errors/delegate-throws-no-error-type.test \ + errors/error-creation-invalid.test \ + errors/error-creation-invalid-type.test \ errors/errors.vala \ errors/errorcode.vala \ errors/errordomain.vala \ diff --git a/tests/errors/error-creation-invalid-type.test b/tests/errors/error-creation-invalid-type.test new file mode 100644 index 000000000..c5080b1e8 --- /dev/null +++ b/tests/errors/error-creation-invalid-type.test @@ -0,0 +1,9 @@ +Invalid Code + +errordomain FooError { + FAIL; +} + +void main () { + var e = new FooError.FAIL (42); +} diff --git a/tests/errors/error-creation-invalid.test b/tests/errors/error-creation-invalid.test new file mode 100644 index 000000000..bb21adf9f --- /dev/null +++ b/tests/errors/error-creation-invalid.test @@ -0,0 +1,9 @@ +Invalid Code + +errordomain FooError { + FAIL; +} + +void main () { + var e = new FooError.FAIL (); +}