[vala/staging: 9/10] tests: Add "constructor chain up" generics test to increase coverage
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/staging: 9/10] tests: Add "constructor chain up" generics test to increase coverage
- Date: Sat, 23 Feb 2019 21:58:00 +0000 (UTC)
commit b488cd24bb6e32aacc437a083dbdcc6b62ab3800
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Sat Feb 23 20:19:31 2019 +0100
tests: Add "constructor chain up" generics test to increase coverage
tests/Makefile.am | 1 +
tests/generics/constructor-chain-up.vala | 12 ++++++++++++
2 files changed, 13 insertions(+)
---
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 6917197fc..676da7ea8 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -426,6 +426,7 @@ TESTS = \
asynchronous/out-parameter-invalid.test \
asynchronous/result-pos.vala \
asynchronous/yield.vala \
+ generics/constructor-chain-up.vala \
generics/bug640330.test \
generics/bug640330.vala \
generics/bug694765-1.vala \
diff --git a/tests/generics/constructor-chain-up.vala b/tests/generics/constructor-chain-up.vala
new file mode 100644
index 000000000..9256b2f32
--- /dev/null
+++ b/tests/generics/constructor-chain-up.vala
@@ -0,0 +1,12 @@
+class Foo<G> : Object {
+ public Foo () {
+ }
+
+ public Foo.bar () {
+ this ();
+ }
+}
+
+void main () {
+ var foo = new Foo<string>.bar ();
+}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]