[vala/0.46] 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.46] tests: Add "access vfunc pointer" test to increase coverage
- Date: Thu, 30 Jul 2020 11:03:07 +0000 (UTC)
commit 661147d77eaee73ce7b4ef5038bac14ef62a9cf9
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 42b6357b4..7183499d7 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -353,6 +353,7 @@ TESTS = \
objects/class_only.vala \
objects/class-destroysinstance.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]