]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
tests: Add "no error type in catch" tests to increase coverage
authorRico Tzschichholz <ricotz@ubuntu.com>
Sat, 23 Oct 2021 13:27:12 +0000 (15:27 +0200)
committerRico Tzschichholz <ricotz@ubuntu.com>
Sun, 24 Oct 2021 12:19:14 +0000 (14:19 +0200)
tests/Makefile.am
tests/errors/catch-no-error-type.test [new file with mode: 0644]

index 8bd6584a239e2435726f3853fcb47012e855dbb0..fb5f4f3a1541c0845cb15b49c83c5e6a3ba29e82 100644 (file)
@@ -622,6 +622,7 @@ TESTS = \
        objects/with-nested-unambigous-signal.vala \
        errors/catch-error-code.vala \
        errors/catch-in-finally.vala \
+       errors/catch-no-error-type.test \
        errors/default-gtype.vala \
        errors/errors.vala \
        errors/errorcode.vala \
diff --git a/tests/errors/catch-no-error-type.test b/tests/errors/catch-no-error-type.test
new file mode 100644 (file)
index 0000000..89df9b5
--- /dev/null
@@ -0,0 +1,7 @@
+Invalid Code
+
+void main () {
+       try {
+       } catch (int e) {
+       }
+}