Skip to content

Commit

Permalink
[#132] ExecuteError 테스트코드 작성
Browse files Browse the repository at this point in the history
  • Loading branch information
myyrakle committed Jul 22, 2024
1 parent 6c4dbe1 commit cf4cbaf
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/errors/execute_error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,22 @@ impl std::fmt::Display for ExecuteError {
write!(formatter, "{}", self.message)
}
}

#[cfg(test)]
mod tests {
use super::*;

#[test]
fn test_execute_error_eq() {
let error1 = ExecuteError::wrap("test");
let error2 = ExecuteError::wrap("test");
assert_eq!(error1, error2);
}

#[test]
fn test_execute_error_display() {
let error = ExecuteError::wrap("test");

assert!(error.to_string().contains("test"));
}
}

0 comments on commit cf4cbaf

Please sign in to comment.