aboutsummaryrefslogtreecommitdiff
path: root/crates/libanalysis/src/module_map_db.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/libanalysis/src/module_map_db.rs')
-rw-r--r--crates/libanalysis/src/module_map_db.rs23
1 files changed, 6 insertions, 17 deletions
diff --git a/crates/libanalysis/src/module_map_db.rs b/crates/libanalysis/src/module_map_db.rs
index 27f19f96e..72173c7bc 100644
--- a/crates/libanalysis/src/module_map_db.rs
+++ b/crates/libanalysis/src/module_map_db.rs
@@ -169,7 +169,6 @@ mod tests {
169 expected: &[FileId], 169 expected: &[FileId],
170 queries: &[(u32, u64)] 170 queries: &[(u32, u64)]
171 ) { 171 ) {
172 eprintln!();
173 let ctx = self.db.query_ctx(); 172 let ctx = self.db.query_ctx();
174 let actual = ctx.get::<ParentModule>(&file_id); 173 let actual = ctx.get::<ParentModule>(&file_id);
175 assert_eq!(actual.as_slice(), expected); 174 assert_eq!(actual.as_slice(), expected);
@@ -194,23 +193,14 @@ mod tests {
194 fn test_parent_module() { 193 fn test_parent_module() {
195 let mut f = Fixture::new(); 194 let mut f = Fixture::new();
196 let foo = f.add_file("/foo.rs", ""); 195 let foo = f.add_file("/foo.rs", "");
197 f.check_parent_modules(foo, &[], &[ 196 // f.check_parent_modules(foo, &[], &[(ModuleDescr::ID, 1)]);
198 (ModuleDescr::ID, 1),
199 (FileSyntax::ID, 1),
200 ]);
201 197
202 let lib = f.add_file("/lib.rs", "mod foo;"); 198 let lib = f.add_file("/lib.rs", "mod foo;");
203 f.check_parent_modules(foo, &[lib], &[ 199 f.check_parent_modules(foo, &[lib], &[(ModuleDescr::ID, 2)]);
204 (ModuleDescr::ID, 1), 200 f.check_parent_modules(foo, &[lib], &[(ModuleDescr::ID, 0)]);
205 (FileSyntax::ID, 2), 201
206 ]); 202 f.change_file(lib, "");
207 // f.check_parent_modules(foo, &[lib], &[ 203 f.check_parent_modules(foo, &[], &[(ModuleDescr::ID, 2)]);
208 // (ModuleDescr::ID, 0),
209 // (FileSyntax::ID, 2),
210 // ]);
211
212 // f.change_file(lib, "");
213 // f.check_parent_modules(foo, &[], &[(ModuleDescr::ID, 2)]);
214 204
215 // f.change_file(lib, "mod foo;"); 205 // f.change_file(lib, "mod foo;");
216 // f.check_parent_modules(foo, &[lib], &[(ModuleDescr::ID, 2)]); 206 // f.check_parent_modules(foo, &[lib], &[(ModuleDescr::ID, 2)]);
@@ -224,5 +214,4 @@ mod tests {
224 // f.remove_file(lib); 214 // f.remove_file(lib);
225 // f.check_parent_modules(foo, &[], &[(ModuleDescr::ID, 1)]); 215 // f.check_parent_modules(foo, &[], &[(ModuleDescr::ID, 1)]);
226 } 216 }
227
228} 217}