Skip to content

Commit

Permalink
Fix coverage of error_action
Browse files Browse the repository at this point in the history
  • Loading branch information
Finomnis committed Oct 21, 2023
1 parent aef288c commit b43de10
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/error_action.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,6 @@ pub enum ErrorAction {
/// Do not forward the error to the parent subsystem.
CatchAndLocalShutdown,
}

#[cfg(test)]
mod tests;
12 changes: 12 additions & 0 deletions src/error_action/tests.rs
Original file line number Diff line number Diff line change
@@ -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));
}

0 comments on commit b43de10

Please sign in to comment.