From 32d02f11d64ce348227e27a1d55183be1ef2d623 Mon Sep 17 00:00:00 2001 From: Rico Tzschichholz Date: Sun, 7 Jan 2018 09:20:43 +0100 Subject: [PATCH] tests: Add "initially-unowned" test to increase coverage --- tests/Makefile.am | 1 + tests/objects/initially-unowned.vala | 10 ++++++++++ 2 files changed, 11 insertions(+) create mode 100644 tests/objects/initially-unowned.vala 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"); +} -- 2.47.3