]> 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>
Mon, 23 Sep 2019 17:52:47 +0000 (19:52 +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 30f87c9ae22b164f719e845276223d41760db905..2b29ac7ae797acb7a1eacea9fe175290c19a57c4 100644 (file)
@@ -535,8 +535,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 () {
+}