diff --git a/src/error_action.rs b/src/error_action.rs index 5155087..d02b27c 100644 --- a/src/error_action.rs +++ b/src/error_action.rs @@ -24,3 +24,6 @@ pub enum ErrorAction { /// Do not forward the error to the parent subsystem. CatchAndLocalShutdown, } + +#[cfg(test)] +mod tests; diff --git a/src/error_action/tests.rs b/src/error_action/tests.rs new file mode 100644 index 0000000..90c84d7 --- /dev/null +++ b/src/error_action/tests.rs @@ -0,0 +1,12 @@ +//Clone, Copy, Debug, Eq, PartialEq + +use super::*; + +#[test] +fn derives() { + let a = ErrorAction::Forward; + let b = ErrorAction::CatchAndLocalShutdown; + + assert_ne!(a, b.clone()); + assert_ne!(format!("{:?}", a), format!("{:?}", b)); +}