From: Rico Tzschichholz Date: Thu, 8 Apr 2021 07:22:13 +0000 (+0200) Subject: tests: Extend "this chainup in compact class" test X-Git-Tag: 0.52.1~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b5f4bf0d073ff0b35f564873713df96526464d71;p=thirdparty%2Fvala.git tests: Extend "this chainup in compact class" test --- 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); }