Fix TestDB::module_at_position with submodules

This commit is contained in:
Jonas Schievink 2021-04-17 03:34:05 +02:00
parent 52585df24a
commit 9e8feeb94a
2 changed files with 72 additions and 2 deletions

View file

@ -954,6 +954,29 @@ fn main() {
)
}
#[test]
fn from_inside_module() {
// This worked correctly, but the test suite logic was broken.
cov_mark::check!(submodule_in_testdb);
check_found_path(
r#"
mod baz {
pub struct Foo {}
}
mod bar {
fn bar() {
$0
}
}
"#,
"crate::baz::Foo",
"crate::baz::Foo",
"crate::baz::Foo",
"crate::baz::Foo",
)
}
#[test]
fn recursive_pub_mod_reexport() {
cov_mark::check!(recursive_imports);