aboutsummaryrefslogtreecommitdiff
path: root/tests/util
diff options
context:
space:
mode:
Diffstat (limited to 'tests/util')
-rw-r--r--tests/util/mod.rs17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/util/mod.rs b/tests/util/mod.rs
index 49ec13e..2bda9ba 100644
--- a/tests/util/mod.rs
+++ b/tests/util/mod.rs
@@ -1,10 +1,27 @@
// Copyright (C) 2018-2019 Robin Krahl <robin.krahl@ireas.org>
// SPDX-License-Identifier: MIT
+#[allow(dead_code)]
pub static ADMIN_PASSWORD: &str = "12345678";
+#[allow(dead_code)]
pub static USER_PASSWORD: &str = "123456";
#[macro_export]
+macro_rules! unwrap_ok {
+ ($val:expr) => {{
+ match $val {
+ Ok(val) => val,
+ Err(err) => panic!(
+ r#"assertion failed: `(left == right)`
+ left: `Ok(_)`,
+ right: `Err({:?})`"#,
+ err
+ ),
+ }
+ }};
+}
+
+#[macro_export]
macro_rules! assert_ok {
($left:expr, $right:expr) => {{
match &$right {