diff options
| author | Wesley Norris <repnop@outlook.com> | 2022-01-17 18:44:43 -0500 |
|---|---|---|
| committer | Wesley Norris <repnop@outlook.com> | 2022-01-17 18:44:43 -0500 |
| commit | ba82cc7722aeb1627da8cde9f342c73a937b276c (patch) | |
| tree | cc271c10280d76645753bc3a83075f2c9239e061 | |
| parent | 7d10752299395448163999cd61be71760157f027 (diff) | |
| download | rust-ba82cc7722aeb1627da8cde9f342c73a937b276c.tar.gz rust-ba82cc7722aeb1627da8cde9f342c73a937b276c.zip | |
Add test for comments not directly next to items
| -rw-r--r-- | crates/ide_db/src/helpers/insert_use/tests.rs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/crates/ide_db/src/helpers/insert_use/tests.rs b/crates/ide_db/src/helpers/insert_use/tests.rs index 887319e924e..4219358a07f 100644 --- a/crates/ide_db/src/helpers/insert_use/tests.rs +++ b/crates/ide_db/src/helpers/insert_use/tests.rs @@ -430,6 +430,23 @@ fn foo() {}"#, } #[test] +fn inserts_after_single_line_header_comments_and_before_item() { + check_none( + "foo::bar::Baz", + r#"// Represents a possible license header +// Line two of possible license header + +fn foo() {}"#, + r#"// Represents a possible license header +// Line two of possible license header + +use foo::bar::Baz; + +fn foo() {}"#, + ); +} + +#[test] fn inserts_after_multiline_inner_comments() { check_none( "foo::bar::Baz", |
