aboutsummaryrefslogtreecommitdiff
path: root/tests/util
diff options
context:
space:
mode:
authorRobin Krahl <robin.krahl@ireas.org>2019-01-17 12:47:52 +0000
committerRobin Krahl <robin.krahl@ireas.org>2019-01-20 21:08:50 +0000
commit5e258d26b55af6bed7c316b1c7ac12e20946702d (patch)
treefee2be71586bef2f1978eb1cf40ef84c8ac6492b /tests/util
parent944e1fa0d51e547dde2a9368d2b8431b109f63c4 (diff)
downloadnitrokey-rs-5e258d26b55af6bed7c316b1c7ac12e20946702d.tar.gz
nitrokey-rs-5e258d26b55af6bed7c316b1c7ac12e20946702d.tar.bz2
Refactor library errors into LibraryError enum
Previously, library errors were part of the CommandError enum. As command errors and library errors are two different error types, they should be split into two enums.
Diffstat (limited to 'tests/util')
-rw-r--r--tests/util/mod.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/util/mod.rs b/tests/util/mod.rs
index f0d0bb5..b1d3ea3 100644
--- a/tests/util/mod.rs
+++ b/tests/util/mod.rs
@@ -67,3 +67,10 @@ macro_rules! assert_cmd_err {
assert_err!(::nitrokey::Error::CommandError, $left, $right);
};
}
+
+#[macro_export]
+macro_rules! assert_lib_err {
+ ($left:expr, $right:expr) => {
+ assert_err!(::nitrokey::Error::LibraryError, $left, $right);
+ };
+}