[vala/0.48] tests: Add "local clash with implicit this" test to increase coverage
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/0.48] tests: Add "local clash with implicit this" test to increase coverage
- Date: Sun, 5 Apr 2020 05:48:27 +0000 (UTC)
commit 7467b1804e3acf362e342c4e803d695ee3978f8c
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Tue Mar 31 10:39:38 2020 +0200
tests: Add "local clash with implicit this" test to increase coverage
tests/Makefile.am | 1 +
tests/control-flow/local-clash-with-implicit-this.vala | 12 ++++++++++++
2 files changed, 13 insertions(+)
---
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 1f965e1b2..882971a9b 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -197,6 +197,7 @@ TESTS = \
control-flow/for.vala \
control-flow/for-switch-continue.vala \
control-flow/foreach.vala \
+ control-flow/local-clash-with-implicit-this.vala \
control-flow/missing-break.test \
control-flow/missing-return.test \
control-flow/nested-conditional.vala \
diff --git a/tests/control-flow/local-clash-with-implicit-this.vala
b/tests/control-flow/local-clash-with-implicit-this.vala
new file mode 100644
index 000000000..73e72d706
--- /dev/null
+++ b/tests/control-flow/local-clash-with-implicit-this.vala
@@ -0,0 +1,12 @@
+class Foo {
+ int clash = 19;
+
+ public Foo () {
+ int clash = clash + 23;
+ assert (clash == 42);
+ }
+}
+
+void main () {
+ new Foo ();
+}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]