summaryrefslogtreecommitdiff
path: root/tests/chainup
diff options
context:
space:
mode:
authorRico Tzschichholz <ricotz@ubuntu.com>2021-04-08 09:22:13 +0200
committerRico Tzschichholz <ricotz@ubuntu.com>2021-04-08 09:22:13 +0200
commitb5f4bf0d073ff0b35f564873713df96526464d71 (patch)
tree43b9354cccb4c5714c41c87dc3cc23944816ab63 /tests/chainup
parent50cbf91db95864299a069d5dba35d8b7f7199941 (diff)
downloadvala-b5f4bf0d073ff0b35f564873713df96526464d71.tar.gz
tests: Extend "this chainup in compact class" test
Diffstat (limited to 'tests/chainup')
-rw-r--r--tests/chainup/class-compact-this.vala7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/chainup/class-compact-this.vala b/tests/chainup/class-compact-this.vala
index aed1ab3fe..3ace7a7eb 100644
--- a/tests/chainup/class-compact-this.vala
+++ b/tests/chainup/class-compact-this.vala
@@ -1,15 +1,18 @@
[Compact]
class Foo {
+ public string s = "foo";
public int i = 42;
- public int j = 23;
+ public int j;
public Foo () {
+ assert (s == "foo");
assert (i == 42);
j = 23;
}
public Foo.bar () {
this ();
+ assert (s == "foo");
assert (i == 42);
assert (j == 23);
}
@@ -18,11 +21,13 @@ class Foo {
void main () {
{
var foo = new Foo ();
+ assert (foo.s == "foo");
assert (foo.i == 42);
assert (foo.j == 23);
}
{
var foo = new Foo.bar ();
+ assert (foo.s == "foo");
assert (foo.i == 42);
assert (foo.j == 23);
}