[vala/0.36: 132/212] tests: Add "initially-unowned" test to increase coverage



commit ced0ff9f0bedd43f9185ab556ea7b077034358bd
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Sun Jan 7 09:20:43 2018 +0100

    tests: Add "initially-unowned" test to increase coverage

 tests/Makefile.am                    |    1 +
 tests/objects/initially-unowned.vala |   10 ++++++++++
 2 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 24a99b5..c16958c 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -177,6 +177,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 0000000..f576b2f
--- /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");
+}


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]