]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
tests: Extend "direct access to error code" test to increase coverage
authorRico Tzschichholz <ricotz@ubuntu.com>
Tue, 22 Feb 2022 12:10:20 +0000 (13:10 +0100)
committerRico Tzschichholz <ricotz@ubuntu.com>
Mon, 21 Mar 2022 08:06:43 +0000 (09:06 +0100)
tests/errors/errorcode.vala

index 2cb96ec67962c580f83bd3fe488d917580b368bc..b1e6d4ce9b083db29f9a720dcae235d49edc9905 100644 (file)
@@ -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);
+       }
 }