[vala/0.36: 140/212] tests: Add "continue" parser test to increase coverage
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/0.36: 140/212] tests: Add "continue" parser test to increase coverage
- Date: Sat, 14 Apr 2018 07:55:07 +0000 (UTC)
commit a0cd17b8af5849069bf9e83fa092c84cf4f96948
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 7773522..200b2c3 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -316,6 +316,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]