From: Rico Tzschichholz Date: Sat, 6 Apr 2019 12:13:34 +0000 (+0200) Subject: tests: Add "unassigned local variable in while" test X-Git-Tag: 0.45.1~63 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b9b8d511aa0904550ca1292c074fcf76fda0fc0d;p=thirdparty%2Fvala.git tests: Add "unassigned local variable in while" test --- diff --git a/tests/Makefile.am b/tests/Makefile.am index ce19144f7..e61c65b18 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); +}