[vala/0.38] tests: Add "continue" parser test to increase coverage
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/0.38] tests: Add "continue" parser test to increase coverage
- Date: Thu, 11 Jan 2018 08:56:15 +0000 (UTC)
commit 112db090cc654c4b2f6c0d76fcf5874e641d0d8f
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Sun Jan 7 16:07:22 2018 +0100
tests: Add "continue" parser test to increase coverage
tests/Makefile.am | 1 +
tests/parser/continue-statement.vala | 12 ++++++++++++
2 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 4df7b66..cbd116e 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -318,6 +318,7 @@ TESTS = \
annotations/description.vala \
annotations/noaccessormethod.test \
parser/assignment.vala \
+ parser/continue-statement.vala \
parser/do-statement.vala \
parser/preprocessor.vala \
parser/template.vala \
diff --git a/tests/parser/continue-statement.vala b/tests/parser/continue-statement.vala
new file mode 100644
index 0000000..c79e810
--- /dev/null
+++ b/tests/parser/continue-statement.vala
@@ -0,0 +1,12 @@
+void main () {
+ int i = 0;
+
+ while (true) {
+ if (i == 0) {
+ i = 42;
+ continue;
+ }
+ break;
+ }
+ assert (i == 42);
+}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]