[vala/0.46] 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.46] tests: Add "local clash with implicit this" test to increase coverage
- Date: Tue, 21 Apr 2020 07:47:59 +0000 (UTC)
commit 7374692839011d6619fee6143947f43260e916d3
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 b823f6aea..b6f831455 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -189,6 +189,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]