1 extern crate clippy_lints;
2 use clippy_lints::utils::without_block_comments;
5 fn test_lines_without_block_comments() {
6 let result = without_block_comments(vec!["/*", "", "*/"]);
7 println!("result: {:?}", result);
8 assert!(result.is_empty());
10 let result = without_block_comments(
11 vec!["", "/*", "", "*/", "#[crate_type = \"lib\"]", "/*", "", "*/", ""]
13 assert_eq!(result, vec!["", "#[crate_type = \"lib\"]", ""]);
15 let result = without_block_comments(vec!["/* rust", "", "*/"]);
16 assert!(result.is_empty());
18 let result = without_block_comments(vec!["/* one-line comment */"]);
19 assert!(result.is_empty());
21 let result = without_block_comments(vec!["/* nested", "/* multi-line", "comment", "*/", "test", "*/"]);
22 assert!(result.is_empty());
24 let result = without_block_comments(vec!["/* nested /* inline /* comment */ test */ */"]);
25 assert!(result.is_empty());
27 let result = without_block_comments(vec!["foo", "bar", "baz"]);
28 assert_eq!(result, vec!["foo", "bar", "baz"]);