[vala/0.48] tests: Extend "direct access to error code" test to increase coverage
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/0.48] tests: Extend "direct access to error code" test to increase coverage
- Date: Mon, 21 Mar 2022 08:17:08 +0000 (UTC)
commit 19f8c6051e25f9703b98fbe7c940c844da3449c0
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Tue Feb 22 13:10:20 2022 +0100
tests: Extend "direct access to error code" test to increase coverage
tests/errors/errorcode.vala | 7 +++++++
1 file changed, 7 insertions(+)
---
diff --git a/tests/errors/errorcode.vala b/tests/errors/errorcode.vala
index 2cb96ec67..b1e6d4ce9 100644
--- a/tests/errors/errorcode.vala
+++ b/tests/errors/errorcode.vala
@@ -4,6 +4,10 @@ errordomain FooError {
EVEN_WORSE = 23
}
+void bar (int code) {
+ assert (code == 23);
+}
+
void main () {
{
var error = new IOError.NO_SPACE ("foo");
@@ -29,4 +33,7 @@ void main () {
var code = FooError.EVEN_WORSE;
assert (code == 23);
}
+ {
+ bar (FooError.EVEN_WORSE);
+ }
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]