[vala/0.48] tests: Add more "invalid" tests to increase coverage



commit 1f79b583052d7b8615ff220454c37d54c07a1dfb
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Mon Aug 10 11:56:47 2020 +0200

    tests: Add more "invalid" tests to increase coverage

 tests/Makefile.am                                   | 2 ++
 tests/semantic/conditional-expression-no-block.test | 6 ++++++
 tests/semantic/delete-unsupported.test              | 6 ++++++
 3 files changed, 14 insertions(+)
---
diff --git a/tests/Makefile.am b/tests/Makefile.am
index bbabf89ff..320a34f52 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -803,6 +803,7 @@ TESTS = \
        semantic/class-singleton-non-gobject.test \
        semantic/class-too-few-type-arguments.test \
        semantic/class-too-many-type-arguments.test \
+       semantic/conditional-expression-no-block.test \
        semantic/constant-extern.test \
        semantic/constant-pointer.test \
        semantic/constant-reassignment-element.test \
@@ -817,6 +818,7 @@ TESTS = \
        semantic/delegate-return-valist.test \
        semantic/delegate-too-few-type-arguments.test \
        semantic/delegate-too-many-type-arguments.test \
+       semantic/delete-unsupported.test \
        semantic/element-access-index-invalid.test \
        semantic/enum-empty.test \
        semantic/errordomain-empty.test \
diff --git a/tests/semantic/conditional-expression-no-block.test 
b/tests/semantic/conditional-expression-no-block.test
new file mode 100644
index 000000000..5f0517020
--- /dev/null
+++ b/tests/semantic/conditional-expression-no-block.test
@@ -0,0 +1,6 @@
+Invalid Code
+
+int foo = true ? 23 : 42;
+
+void main () {
+}
diff --git a/tests/semantic/delete-unsupported.test b/tests/semantic/delete-unsupported.test
new file mode 100644
index 000000000..d150cadb3
--- /dev/null
+++ b/tests/semantic/delete-unsupported.test
@@ -0,0 +1,6 @@
+Invalid Code
+
+void main () {
+       int foo = 23;
+       delete foo;
+}


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