[vala/0.44] tests: Add "unassigned local variable in while" test
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/0.44] tests: Add "unassigned local variable in while" test
- Date: Mon, 8 Apr 2019 13:59:11 +0000 (UTC)
commit 70c45628390632b638f131d445f9a08591db8040
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Sat Apr 6 14:13:34 2019 +0200
tests: Add "unassigned local variable in while" test
tests/Makefile.am | 1 +
tests/control-flow/unassigned-local-variable-while.test | 11 +++++++++++
2 files changed, 12 insertions(+)
---
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 62749bdb6..2823697c3 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -164,6 +164,7 @@ TESTS = \
control-flow/unassigned-captured-local-variable.test \
control-flow/unassigned-local-block-variable.test \
control-flow/unassigned-local-variable.test \
+ control-flow/unassigned-local-variable-while.test \
control-flow/while-false.vala \
control-flow/bug628336.vala \
control-flow/bug639482.vala \
diff --git a/tests/control-flow/unassigned-local-variable-while.test
b/tests/control-flow/unassigned-local-variable-while.test
new file mode 100644
index 000000000..d036a56b7
--- /dev/null
+++ b/tests/control-flow/unassigned-local-variable-while.test
@@ -0,0 +1,11 @@
+Invalid Code
+
+void main () {
+ bool cond = false;
+
+ string s;
+ while (cond) {
+ s = "foo";
+ }
+ print ("%s", s);
+}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]