Skip to content

Commit

Permalink
style(utils): cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
hitenkoku committed Sep 21, 2023
1 parent a870a54 commit 7aa1794
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/detections/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -713,7 +713,7 @@ mod tests {
use regex::Regex;
use serde_json::Value;

use super::{output_profile_name, output_duration};
use super::{output_duration, output_profile_name};

#[test]
fn test_create_recordinfos() {
Expand Down Expand Up @@ -1118,10 +1118,15 @@ mod tests {
#[test]
/// Durationから出力文字列を作成する関数のテスト
fn test_output_duration() {
let time1 = NaiveDate::from_ymd_opt(2021, 12, 26).unwrap().and_hms_milli_opt(2,34, 49, 0).unwrap();
let time2 = NaiveDate::from_ymd_opt(2021, 12, 25).unwrap().and_hms_milli_opt(1,23, 45, 678).unwrap();
let time1 = NaiveDate::from_ymd_opt(2021, 12, 26)
.unwrap()
.and_hms_milli_opt(2, 34, 49, 0)
.unwrap();
let time2 = NaiveDate::from_ymd_opt(2021, 12, 25)
.unwrap()
.and_hms_milli_opt(1, 23, 45, 678)
.unwrap();
assert_eq!(output_duration(time1 - time2), "25:11:03.322".to_string());
assert_eq!(output_duration(time2 - time1), "25:11:03.322".to_string());
}

}

0 comments on commit 7aa1794

Please sign in to comment.