]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
tests: Add invalid "parser" tests to increase coverage
authorRico Tzschichholz <ricotz@ubuntu.com>
Mon, 23 Sep 2019 17:06:50 +0000 (19:06 +0200)
committerRico Tzschichholz <ricotz@ubuntu.com>
Sat, 5 Oct 2019 11:32:03 +0000 (13:32 +0200)
tests/Makefile.am
tests/parser/creation-no-new.test [new file with mode: 0644]
tests/parser/delegate-anonymous.test [new file with mode: 0644]

index c4891db2fd91cdc7138de5c25454f00eb40736cc..2e79b603751542533f2a473dd3707a24a6577612 100644 (file)
@@ -530,8 +530,10 @@ TESTS = \
        parser/constructor-static-exists.test \
        parser/continue-statement.vala \
        parser/creation-no-abstract.test \
+       parser/creation-no-new.test \
        parser/creation-no-override.test \
        parser/creation-no-virtual.test \
+       parser/delegate-anonymous.test \
        parser/delegate-no-new.test \
        parser/destructor-class-exists.test \
        parser/destructor-exists.test \
diff --git a/tests/parser/creation-no-new.test b/tests/parser/creation-no-new.test
new file mode 100644 (file)
index 0000000..97f30dd
--- /dev/null
@@ -0,0 +1,9 @@
+Invalid Code
+
+public class Test {
+       new Test () {
+       }
+}
+
+void main () {
+}
diff --git a/tests/parser/delegate-anonymous.test b/tests/parser/delegate-anonymous.test
new file mode 100644 (file)
index 0000000..25b632b
--- /dev/null
@@ -0,0 +1,7 @@
+Invalid Code
+
+[CCode (has_typedef = false)]
+public delegate void MyDelegate ();
+
+void main () {
+}