]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
tests: Add invalid "silent cast of array" test to increase coverage
authorRico Tzschichholz <ricotz@ubuntu.com>
Wed, 23 Oct 2019 13:30:40 +0000 (15:30 +0200)
committerRico Tzschichholz <ricotz@ubuntu.com>
Thu, 7 Nov 2019 11:11:48 +0000 (12:11 +0100)
tests/Makefile.am
tests/arrays/cast-silent-invalid.test [new file with mode: 0644]

index 51ee4d41d8f3d2a4d91782fa9ddaa349a3428f9f..08e46cd05daefa4dee1d393a11e81e2ae4fa725a 100644 (file)
@@ -69,6 +69,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 (file)
index 0000000..6e73615
--- /dev/null
@@ -0,0 +1,6 @@
+Invalid Code
+
+void main () {
+       void* foo = null;
+       unowned int[] bar = foo as int[];
+}