diff options
author | Corentin Noël <corentin@elementary.io> | 2019-03-22 09:09:21 +0100 |
---|---|---|
committer | Rico Tzschichholz <ricotz@ubuntu.com> | 2019-03-22 13:18:08 +0100 |
commit | 230cd3543514a6152236aecb39169a5f87eb3c86 (patch) | |
tree | bda04ba5bf34a3ab7d810ed59250960c4888e98b /tests/arrays | |
parent | 12957d17a7b1e2a0cd5ef5af54da0b9a49372131 (diff) | |
download | vala-230cd3543514a6152236aecb39169a5f87eb3c86.tar.gz |
tests: Add more invalid "assignment" tests to increase coverage
Diffstat (limited to 'tests/arrays')
-rw-r--r-- | tests/arrays/expression-bracket.test | 13 | ||||
-rw-r--r-- | tests/arrays/fixed-length-non-const.test | 6 |
2 files changed, 19 insertions, 0 deletions
diff --git a/tests/arrays/expression-bracket.test b/tests/arrays/expression-bracket.test new file mode 100644 index 000000000..c0422a34f --- /dev/null +++ b/tests/arrays/expression-bracket.test @@ -0,0 +1,13 @@ +Invalid Code + +int bar () { + return 1; +} + +string[bar ()]? foo () { + return null; +} + +void main () { + foo (); +} diff --git a/tests/arrays/fixed-length-non-const.test b/tests/arrays/fixed-length-non-const.test new file mode 100644 index 000000000..7ae22936f --- /dev/null +++ b/tests/arrays/fixed-length-non-const.test @@ -0,0 +1,6 @@ +Invalid Code + +void main () { + int test_len = 60; + string test_array[test_len]; +} |