Skip to content

Commit ba82cc7

Browse files
committed
Add test for comments not directly next to items
1 parent 7d10752 commit ba82cc7

File tree

1 file changed

+17
-0
lines changed
  • crates/ide_db/src/helpers/insert_use

1 file changed

+17
-0
lines changed

crates/ide_db/src/helpers/insert_use/tests.rs

+17
Original file line numberDiff line numberDiff line change
@@ -429,6 +429,23 @@ fn foo() {}"#,
429429
);
430430
}
431431

432+
#[test]
433+
fn inserts_after_single_line_header_comments_and_before_item() {
434+
check_none(
435+
"foo::bar::Baz",
436+
r#"// Represents a possible license header
437+
// Line two of possible license header
438+
439+
fn foo() {}"#,
440+
r#"// Represents a possible license header
441+
// Line two of possible license header
442+
443+
use foo::bar::Baz;
444+
445+
fn foo() {}"#,
446+
);
447+
}
448+
432449
#[test]
433450
fn inserts_after_multiline_inner_comments() {
434451
check_none(

0 commit comments

Comments
 (0)