]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
tests: Add more "invalid" tests to increase coverage
authorRico Tzschichholz <ricotz@ubuntu.com>
Mon, 10 Aug 2020 09:56:47 +0000 (11:56 +0200)
committerRico Tzschichholz <ricotz@ubuntu.com>
Mon, 10 Aug 2020 11:49:04 +0000 (13:49 +0200)
tests/Makefile.am
tests/semantic/conditional-expression-no-block.test [new file with mode: 0644]
tests/semantic/delete-unsupported.test [new file with mode: 0644]

index e98e4dca651311e3f52c5293d06af949cb272585..12c90bf0b505c44025012c9cae1ca7c35b1d1cd7 100644 (file)
@@ -818,6 +818,7 @@ TESTS = \
        semantic/class-singleton-non-gobject.test \
        semantic/class-too-few-type-arguments.test \
        semantic/class-too-many-type-arguments.test \
+       semantic/conditional-expression-no-block.test \
        semantic/constant-extern.test \
        semantic/constant-pointer.test \
        semantic/constant-reassignment-element.test \
@@ -832,6 +833,7 @@ TESTS = \
        semantic/delegate-return-valist.test \
        semantic/delegate-too-few-type-arguments.test \
        semantic/delegate-too-many-type-arguments.test \
+       semantic/delete-unsupported.test \
        semantic/element-access-index-invalid.test \
        semantic/enum-empty.test \
        semantic/errordomain-empty.test \
diff --git a/tests/semantic/conditional-expression-no-block.test b/tests/semantic/conditional-expression-no-block.test
new file mode 100644 (file)
index 0000000..5f05170
--- /dev/null
@@ -0,0 +1,6 @@
+Invalid Code
+
+int foo = true ? 23 : 42;
+
+void main () {
+}
diff --git a/tests/semantic/delete-unsupported.test b/tests/semantic/delete-unsupported.test
new file mode 100644 (file)
index 0000000..d150cad
--- /dev/null
@@ -0,0 +1,6 @@
+Invalid Code
+
+void main () {
+       int foo = 23;
+       delete foo;
+}