[vala/0.40] tests: Add invalid "silent cast of array" test to increase coverage



commit 529375bdd61bf37afb9d1cfddcaa07d2696eaa7f
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Wed Oct 23 15:30:40 2019 +0200

    tests: Add invalid "silent cast of array" test to increase coverage

 tests/Makefile.am                     | 1 +
 tests/arrays/cast-silent-invalid.test | 6 ++++++
 2 files changed, 7 insertions(+)
---
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 0403fb791..8fab2a1b2 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -61,6 +61,7 @@ TESTS = \
        basic-types/bug777697.test \
        basic-types/bug787152.vala \
        basic-types/bug788775.vala \
+       arrays/cast-silent-invalid.test \
        arrays/class-field-length-cname.vala \
        arrays/expression-bracket.test \
        arrays/field-global-length-cname.vala \
diff --git a/tests/arrays/cast-silent-invalid.test b/tests/arrays/cast-silent-invalid.test
new file mode 100644
index 000000000..6e7361567
--- /dev/null
+++ b/tests/arrays/cast-silent-invalid.test
@@ -0,0 +1,6 @@
+Invalid Code
+
+void main () {
+       void* foo = null;
+       unowned int[] bar = foo as int[];
+}


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