From: Rico Tzschichholz Date: Tue, 22 Feb 2022 12:10:20 +0000 (+0100) Subject: tests: Extend "direct access to error code" test to increase coverage X-Git-Tag: 0.48.24~19 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=19f8c6051e25f9703b98fbe7c940c844da3449c0;p=thirdparty%2Fvala.git tests: Extend "direct access to error code" test to increase coverage --- diff --git a/tests/errors/errorcode.vala b/tests/errors/errorcode.vala index 2cb96ec67..b1e6d4ce9 100644 --- a/tests/errors/errorcode.vala +++ b/tests/errors/errorcode.vala @@ -4,6 +4,10 @@ errordomain FooError { EVEN_WORSE = 23 } +void bar (int code) { + assert (code == 23); +} + void main () { { var error = new IOError.NO_SPACE ("foo"); @@ -29,4 +33,7 @@ void main () { var code = FooError.EVEN_WORSE; assert (code == 23); } + { + bar (FooError.EVEN_WORSE); + } }