[vala/0.52] tests: Extend "field access" tests to increase coverage
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/0.52] tests: Extend "field access" tests to increase coverage
- Date: Wed, 22 Sep 2021 14:14:41 +0000 (UTC)
commit 28bf57110de059d3eeeb90363b9ad8ccd7f23e55
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Tue Aug 31 16:28:05 2021 +0200
tests: Extend "field access" tests to increase coverage
See https://gitlab.gnome.org/GNOME/vala/issues/1221
tests/objects/fields.vala | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
---
diff --git a/tests/objects/fields.vala b/tests/objects/fields.vala
index 0872045bb..e14572bd9 100644
--- a/tests/objects/fields.vala
+++ b/tests/objects/fields.vala
@@ -32,6 +32,11 @@ class Faz : Foo {
assert (private_class_field == 42);
private_class_field = 24;
assert (private_class_field == 24);
+
+ assert (public_base_class_field == 42);
+ public_base_class_field = 24;
+ assert (public_base_class_field == 24);
+ public_base_class_field = 42;
}
static construct {
@@ -42,6 +47,11 @@ class Faz : Foo {
assert (private_class_field == 42);
private_class_field = 24;
assert (private_class_field == 24);
+
+ assert (public_base_class_field == 42);
+ public_base_class_field = 24;
+ assert (public_base_class_field == 24);
+ public_base_class_field = 42;
}
public void action () {
@@ -132,6 +142,11 @@ class Baz : Bar {
assert (private_class_field == 42);
private_class_field = 24;
assert (private_class_field == 24);
+
+ assert (public_base_class_field == 42);
+ public_base_class_field = 24;
+ assert (public_base_class_field == 24);
+ public_base_class_field = 42;
}
static construct {
@@ -142,6 +157,11 @@ class Baz : Bar {
assert (private_class_field == 42);
private_class_field = 24;
assert (private_class_field == 24);
+
+ assert (public_base_class_field == 42);
+ public_base_class_field = 24;
+ assert (public_base_class_field == 24);
+ public_base_class_field = 42;
}
public void action () {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]