]> 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>
Wed, 23 Oct 2019 13:30:40 +0000 (15:30 +0200)
tests/Makefile.am
tests/arrays/cast-silent-invalid.test [new file with mode: 0644]

index cca86afdfc75427782c9cac24aef7a300bc82c3a..b2a740c13a3433699e95832646519110eadf705f 100644 (file)
@@ -70,6 +70,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[];
+}