From: Rico Tzschichholz Date: Wed, 23 Oct 2019 13:30:40 +0000 (+0200) Subject: tests: Add invalid "silent cast of array" test to increase coverage X-Git-Tag: 0.44.10~23 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ccfc0455a1e5162082d9df576687d4b1855a3841;p=thirdparty%2Fvala.git tests: Add invalid "silent cast of array" test to increase coverage --- diff --git a/tests/Makefile.am b/tests/Makefile.am index 51ee4d41d..08e46cd05 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -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 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[]; +}