[vala/0.38] tests: Add "while (false)" test to increase coverage



commit b5dda457ae18dfc9d915a17154ef5c5a9131d68e
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Sun Jan 7 18:59:11 2018 +0100

    tests: Add "while (false)" test to increase coverage

 tests/Makefile.am                   |    1 +
 tests/control-flow/while-false.vala |    5 +++++
 2 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/tests/Makefile.am b/tests/Makefile.am
index cbd116e..1855ff4 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -113,6 +113,7 @@ TESTS = \
        control-flow/nested-conditional.vala \
        control-flow/switch.vala \
        control-flow/sideeffects.vala \
+       control-flow/while-false.vala \
        control-flow/bug628336.vala \
        control-flow/bug639482.vala \
        control-flow/bug652549.vala \
diff --git a/tests/control-flow/while-false.vala b/tests/control-flow/while-false.vala
new file mode 100644
index 0000000..44e136a
--- /dev/null
+++ b/tests/control-flow/while-false.vala
@@ -0,0 +1,5 @@
+void main () {
+       while (false) {
+               assert_not_reached ();
+       }
+}


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]