From: Rico Tzschichholz Date: Mon, 23 Sep 2019 17:06:50 +0000 (+0200) Subject: tests: Add invalid "parser" tests to increase coverage X-Git-Tag: 0.44.9~31 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=50323940c5a8c07388792fc1938eca078592c010;p=thirdparty%2Fvala.git tests: Add invalid "parser" tests to increase coverage --- diff --git a/tests/Makefile.am b/tests/Makefile.am index c4891db2f..2e79b6037 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -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 index 000000000..97f30ddfb --- /dev/null +++ b/tests/parser/creation-no-new.test @@ -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 index 000000000..25b632b38 --- /dev/null +++ b/tests/parser/delegate-anonymous.test @@ -0,0 +1,7 @@ +Invalid Code + +[CCode (has_typedef = false)] +public delegate void MyDelegate (); + +void main () { +}