[vala/0.54] tests: Add invalid "error creation" tests to increase coverage
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/0.54] tests: Add invalid "error creation" tests to increase coverage
- Date: Thu, 17 Mar 2022 11:07:04 +0000 (UTC)
commit 636a34f8c11ee69929457e4b74ee9b6f40acf3b9
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Tue Feb 22 10:56:05 2022 +0100
tests: Add invalid "error creation" tests to increase coverage
tests/Makefile.am | 2 ++
tests/errors/error-creation-invalid-type.test | 9 +++++++++
tests/errors/error-creation-invalid.test | 9 +++++++++
3 files changed, 20 insertions(+)
---
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 6f14a582a..2e77fd7f6 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -662,6 +662,8 @@ TESTS = \
errors/default-gtype.vala \
errors/delegate-throws-error-code.vala \
errors/delegate-throws-no-error-type.test \
+ errors/error-creation-invalid.test \
+ errors/error-creation-invalid-type.test \
errors/errors.vala \
errors/errorcode.vala \
errors/errordomain.vala \
diff --git a/tests/errors/error-creation-invalid-type.test b/tests/errors/error-creation-invalid-type.test
new file mode 100644
index 000000000..c5080b1e8
--- /dev/null
+++ b/tests/errors/error-creation-invalid-type.test
@@ -0,0 +1,9 @@
+Invalid Code
+
+errordomain FooError {
+ FAIL;
+}
+
+void main () {
+ var e = new FooError.FAIL (42);
+}
diff --git a/tests/errors/error-creation-invalid.test b/tests/errors/error-creation-invalid.test
new file mode 100644
index 000000000..bb21adf9f
--- /dev/null
+++ b/tests/errors/error-creation-invalid.test
@@ -0,0 +1,9 @@
+Invalid Code
+
+errordomain FooError {
+ FAIL;
+}
+
+void main () {
+ var e = new FooError.FAIL ();
+}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]