[vala/0.48] tests: Add "access vfunc pointer" test to increase coverage
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/0.48] tests: Add "access vfunc pointer" test to increase coverage
- Date: Wed, 22 Jul 2020 11:54:23 +0000 (UTC)
commit 73db997e8cf6825cb02efff66d6f32f417d7b1e0
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Mon Jul 20 20:11:13 2020 +0200
tests: Add "access vfunc pointer" test to increase coverage
tests/Makefile.am | 1 +
tests/objects/class-vfunc-base-access.vala | 30 ++++++++++++++++++++++++++++++
2 files changed, 31 insertions(+)
---
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 8e790984b..9b03f54ec 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -368,6 +368,7 @@ TESTS = \
objects/class-destroysinstance.vala \
objects/class-inner-types.vala \
objects/class-new-no-override.vala \
+ objects/class-vfunc-base-access.vala \
objects/classes.vala \
objects/classes-interfaces.vala \
objects/classes-interfaces-virtuals.vala \
diff --git a/tests/objects/class-vfunc-base-access.vala b/tests/objects/class-vfunc-base-access.vala
new file mode 100644
index 000000000..d2573da94
--- /dev/null
+++ b/tests/objects/class-vfunc-base-access.vala
@@ -0,0 +1,30 @@
+abstract class Foo {
+ public virtual signal void foo () {
+ }
+
+ public abstract void baz ();
+
+ public virtual void manam () {
+ }
+}
+
+class Bar : Foo {
+ public override void foo () {
+ assert (base.foo != null);
+ }
+
+ public override void baz () {
+ assert (base.baz != null);
+ }
+
+ public override void manam () {
+ assert (base.manam != null);
+ }
+}
+
+void main () {
+ var bar = new Bar ();
+ bar.foo ();
+ bar.baz ();
+ bar.manam ();
+}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]