[vala] tests: Add invalid "parser" tests to increase coverage
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala] tests: Add invalid "parser" tests to increase coverage
- Date: Tue, 24 Sep 2019 07:39:03 +0000 (UTC)
commit 3a2fdaa489e6b5417f5354b231fab28cfde73104
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 30f87c9ae..2b29ac7ae 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -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
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]