From eb4419bfd990f0abe75e5e7c248fe1e7efa0843a Mon Sep 17 00:00:00 2001 From: Daniel Mueller Date: Wed, 8 Jul 2020 09:16:56 -0700 Subject: Remove unwrap_str_err method from UnwrapError test trait With upcoming changes we intend to move towards a model where we do not distinguish the individual error variants the program deals with in a global enum. In preparation of such a change, this patch marks a first step in removing the UnwrapError test trait, which relies on the existence of exactly such typed errors. In particular, we remove the unwrap_str_err method from it, basically falling back to just working with strings. --- src/tests/status.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/tests/status.rs') diff --git a/src/tests/status.rs b/src/tests/status.rs index c9f4976..e80fadc 100644 --- a/src/tests/status.rs +++ b/src/tests/status.rs @@ -1,7 +1,7 @@ // status.rs // ************************************************************************* -// * Copyright (C) 2019 Daniel Mueller (deso@posteo.net) * +// * Copyright (C) 2019-2020 Daniel Mueller (deso@posteo.net) * // * * // * This program is free software: you can redistribute it and/or modify * // * it under the terms of the GNU General Public License as published by * @@ -33,7 +33,8 @@ fn not_found_raw() { #[test_device] fn not_found() { let res = Nitrocli::new().handle(&["status"]); - assert_eq!(res.unwrap_str_err(), "Nitrokey device not found"); + let err = res.unwrap_err().to_string(); + assert_eq!(err, "Nitrokey device not found"); } #[test_device(pro)] -- cgit v1.2.1