[vala/0.50] tests: Add "constructor with inner error" test to increase coverage



commit 202059c7b1beb936199ab2d12b151f3c2596f46c
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Sat Nov 14 21:31:03 2020 +0100

    tests: Add "constructor with inner error" test to increase coverage

 tests/Makefile.am                          |  1 +
 tests/objects/constructor-inner-error.vala | 24 ++++++++++++++++++++++++
 2 files changed, 25 insertions(+)
---
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 4c4cc3473..6fadb6d4a 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -391,6 +391,7 @@ TESTS = \
        objects/compact-class-refcount.vala \
        objects/compact-class-custom-ref.vala \
        objects/constructor-abstract-public.test \
+       objects/constructor-inner-error.vala \
        objects/constructor-variadic.test \
        objects/constructor-wrong-name.test \
        objects/constructors.vala \
diff --git a/tests/objects/constructor-inner-error.vala b/tests/objects/constructor-inner-error.vala
new file mode 100644
index 000000000..896ffe976
--- /dev/null
+++ b/tests/objects/constructor-inner-error.vala
@@ -0,0 +1,24 @@
+void bar () throws Error {
+}
+
+class Foo : Object {
+       public Foo () throws Error {
+               bar ();
+       }
+
+       construct {
+               bar ();
+       }
+
+       class construct {
+               bar ();
+       }
+
+       static construct {
+               bar ();
+       }
+}
+
+void main () {
+       var foo = new Foo ();
+}


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