From 374db10a626587c52147738967b8d0a1ec2b2ea4 Mon Sep 17 00:00:00 2001 From: DustInDark Date: Sat, 11 Jun 2022 03:41:45 +0900 Subject: [PATCH] fixed test --- src/yaml.rs | 26 ++++---------------------- 1 file changed, 4 insertions(+), 22 deletions(-) diff --git a/src/yaml.rs b/src/yaml.rs index 0c9ca327..265f7dad 100644 --- a/src/yaml.rs +++ b/src/yaml.rs @@ -416,13 +416,7 @@ mod tests { let mut yaml = yaml::ParseYaml::new(); let path = Path::new("test_files/rules/yaml"); yaml.read_dir(path, "", &filter::exclude_ids()).unwrap(); - assert_eq!( - yaml.rule_load_status_cnt - .get("excluded") - .unwrap() - .to_owned(), - 5 - ); + assert_eq!(yaml.rule_load_cnt.get("excluded").unwrap().to_owned(), 5); } #[test] fn test_all_noisy_rules_file() { @@ -431,10 +425,7 @@ mod tests { let mut yaml = yaml::ParseYaml::new(); let path = Path::new("test_files/rules/yaml"); yaml.read_dir(path, "", &filter::exclude_ids()).unwrap(); - assert_eq!( - yaml.rule_load_status_cnt.get("noisy").unwrap().to_owned(), - 5 - ); + assert_eq!(yaml.rule_load_cnt.get("noisy").unwrap().to_owned(), 5); } #[test] fn test_none_exclude_rules_file() { @@ -444,13 +435,7 @@ mod tests { let path = Path::new("test_files/rules/yaml"); let exclude_ids = RuleExclude::default(); yaml.read_dir(path, "", &exclude_ids).unwrap(); - assert_eq!( - yaml.rule_load_status_cnt - .get("excluded") - .unwrap() - .to_owned(), - 0 - ); + assert_eq!(yaml.rule_load_cnt.get("excluded").unwrap().to_owned(), 0); } #[test] fn test_exclude_deprecated_rules_file() { @@ -459,10 +444,7 @@ mod tests { let exclude_ids = RuleExclude::default(); yaml.read_dir(path, "", &exclude_ids).unwrap(); assert_eq!( - yaml.rule_load_status_cnt - .get("deprecate") - .unwrap() - .to_owned(), + yaml.rule_status_cnt.get("deprecated").unwrap().to_owned(), 2 ); }