mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-15 01:17:16 +00:00
Add test module for update_lints
This commit is contained in:
parent
3f804ca6d3
commit
20abbd93f9
1 changed files with 166 additions and 160 deletions
|
@ -526,6 +526,10 @@ declare_deprecated_lint! {
|
|||
assert_eq!(expected, result);
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
fn test_replace_region() {
|
||||
let text = "\nabc\n123\n789\ndef\nghi";
|
||||
|
@ -667,7 +671,8 @@ fn test_gen_modules_list() {
|
|||
Lint::new("should_assert_eq", "group1", "abc", None, "module_name"),
|
||||
Lint::new("incorrect_stuff", "group3", "abc", None, "another_module"),
|
||||
];
|
||||
let expected = GENERATED_FILE_COMMENT.to_string() + &["mod another_module;", "mod module_name;"].join("\n") + "\n";
|
||||
let expected =
|
||||
GENERATED_FILE_COMMENT.to_string() + &["mod another_module;", "mod module_name;"].join("\n") + "\n";
|
||||
assert_eq!(expected, gen_modules_list(lints.iter()));
|
||||
}
|
||||
|
||||
|
@ -693,3 +698,4 @@ fn test_gen_lint_group_list() {
|
|||
|
||||
assert_eq!(expected, result);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue