aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_def/src/body/tests.rs
diff options
context:
space:
mode:
authorJonas Schievink <[email protected]>2021-04-21 16:57:45 +0100
committerJonas Schievink <[email protected]>2021-04-21 16:57:45 +0100
commit7b7d051e8102529eb75c64281e368b84a1e0989d (patch)
tree886ff681fe79535310d4f74dbbc7ff638ac2af96 /crates/hir_def/src/body/tests.rs
parentc7ae16e87291ce6ccc2233576c8a74cb7ab347d8 (diff)
Add failing local items test
Diffstat (limited to 'crates/hir_def/src/body/tests.rs')
-rw-r--r--crates/hir_def/src/body/tests.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/crates/hir_def/src/body/tests.rs b/crates/hir_def/src/body/tests.rs
index 63f5fe88d..3e8f16306 100644
--- a/crates/hir_def/src/body/tests.rs
+++ b/crates/hir_def/src/body/tests.rs
@@ -40,6 +40,14 @@ fn block_def_map_at(ra_fixture: &str) -> String {
40 module.def_map(&db).dump(&db) 40 module.def_map(&db).dump(&db)
41} 41}
42 42
43fn check_block_scopes_at(ra_fixture: &str, expect: Expect) {
44 let (db, position) = crate::test_db::TestDB::with_position(ra_fixture);
45
46 let module = db.module_at_position(position);
47 let actual = module.def_map(&db).dump_block_scopes(&db);
48 expect.assert_eq(&actual);
49}
50
43fn check_at(ra_fixture: &str, expect: Expect) { 51fn check_at(ra_fixture: &str, expect: Expect) {
44 let actual = block_def_map_at(ra_fixture); 52 let actual = block_def_map_at(ra_fixture);
45 expect.assert_eq(&actual); 53 expect.assert_eq(&actual);