From: Rico Tzschichholz Date: Sun, 7 Jan 2018 08:20:43 +0000 (+0100) Subject: tests: Add "initially-unowned" test to increase coverage X-Git-Tag: 0.39.4~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=32d02f11d64ce348227e27a1d55183be1ef2d623;p=thirdparty%2Fvala.git tests: Add "initially-unowned" test to increase coverage --- diff --git a/tests/Makefile.am b/tests/Makefile.am index 95cc6f282..8ba947c40 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -182,6 +182,7 @@ TESTS = \ objects/classes.vala \ objects/constructors.vala \ objects/generics.vala \ + objects/initially-unowned.vala \ objects/fields.vala \ objects/interfaces.vala \ objects/methods.vala \ diff --git a/tests/objects/initially-unowned.vala b/tests/objects/initially-unowned.vala new file mode 100644 index 000000000..f576b2fb4 --- /dev/null +++ b/tests/objects/initially-unowned.vala @@ -0,0 +1,10 @@ +class Foo : Object { + public string foo { get; construct; } +} + +void main () { + Foo foo; + + foo = (Foo) Object.@new (typeof (Foo), "foo", "foo.initially"); + assert (foo.foo == "foo.initially"); +}