[vala/0.44] tests: Add invalid "parser" tests to increase coverage



commit 50323940c5a8c07388792fc1938eca078592c010
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Mon Sep 23 19:06:50 2019 +0200

    tests: Add invalid "parser" tests to increase coverage

 tests/Makefile.am                    | 2 ++
 tests/parser/creation-no-new.test    | 9 +++++++++
 tests/parser/delegate-anonymous.test | 7 +++++++
 3 files changed, 18 insertions(+)
---
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 () {
+}


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]