[vala/0.40] tests: Add "constructor with inner error" test to increase coverage
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/0.40] tests: Add "constructor with inner error" test to increase coverage
- Date: Sun, 3 Jan 2021 12:46:52 +0000 (UTC)
commit 489eb2e72311980669439f2f836bf509ae663761
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 5c72dff88..0945c7ed4 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -338,6 +338,7 @@ TESTS = \
objects/class-vfunc-base-access.vala \
objects/classes.vala \
objects/compact-class-destructor.vala \
+ 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]