diff options
author | Rico Tzschichholz <ricotz@ubuntu.com> | 2020-03-31 10:39:38 +0200 |
---|---|---|
committer | Rico Tzschichholz <ricotz@ubuntu.com> | 2020-03-31 10:39:38 +0200 |
commit | f9c688ad262dc6db5047981b00a9753d86b5fdf6 (patch) | |
tree | fd0703919e0146fbff251615ef96c2743156c9f9 /tests/enums/switch.vala | |
parent | 795e3217f7166acbe6d505282e6f1f9e3b8c2712 (diff) | |
download | vala-f9c688ad262dc6db5047981b00a9753d86b5fdf6.tar.gz |
tests: Add "switch enum" test to increase coverage
Diffstat (limited to 'tests/enums/switch.vala')
-rw-r--r-- | tests/enums/switch.vala | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/enums/switch.vala b/tests/enums/switch.vala new file mode 100644 index 000000000..031881bd8 --- /dev/null +++ b/tests/enums/switch.vala @@ -0,0 +1,18 @@ +enum Foo { + BAR, + MANAM +} + +void main () { + var foo = Foo.MANAM; + + switch (foo) { + case Foo.BAR: + assert_not_reached (); + break; + case Foo.MANAM: + break; + default: + assert_not_reached (); + } +} |