diff options
Diffstat (limited to 'crates/libanalysis/tests')
-rw-r--r-- | crates/libanalysis/tests/tests.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/crates/libanalysis/tests/tests.rs b/crates/libanalysis/tests/tests.rs index 5893efaf6..2f1299463 100644 --- a/crates/libanalysis/tests/tests.rs +++ b/crates/libanalysis/tests/tests.rs | |||
@@ -5,7 +5,7 @@ extern crate test_utils; | |||
5 | use std::path::{Path}; | 5 | use std::path::{Path}; |
6 | 6 | ||
7 | use relative_path::RelativePath; | 7 | use relative_path::RelativePath; |
8 | use libanalysis::{WorldState, FileId, FileResolver}; | 8 | use libanalysis::{AnalysisHost, FileId, FileResolver}; |
9 | use test_utils::assert_eq_dbg; | 9 | use test_utils::assert_eq_dbg; |
10 | 10 | ||
11 | struct FileMap(&'static [(u32, &'static str)]); | 11 | struct FileMap(&'static [(u32, &'static str)]); |
@@ -37,7 +37,7 @@ impl FileResolver for FileMap { | |||
37 | 37 | ||
38 | #[test] | 38 | #[test] |
39 | fn test_resolve_module() { | 39 | fn test_resolve_module() { |
40 | let mut world = WorldState::new(); | 40 | let mut world = AnalysisHost::new(); |
41 | world.change_file(FileId(1), Some("mod foo;".to_string())); | 41 | world.change_file(FileId(1), Some("mod foo;".to_string())); |
42 | world.change_file(FileId(2), Some("".to_string())); | 42 | world.change_file(FileId(2), Some("".to_string())); |
43 | 43 | ||
@@ -64,7 +64,7 @@ fn test_resolve_module() { | |||
64 | 64 | ||
65 | #[test] | 65 | #[test] |
66 | fn test_unresolved_module_diagnostic() { | 66 | fn test_unresolved_module_diagnostic() { |
67 | let mut world = WorldState::new(); | 67 | let mut world = AnalysisHost::new(); |
68 | world.change_file(FileId(1), Some("mod foo;".to_string())); | 68 | world.change_file(FileId(1), Some("mod foo;".to_string())); |
69 | 69 | ||
70 | let snap = world.analysis(FileMap(&[(1, "/lib.rs")])); | 70 | let snap = world.analysis(FileMap(&[(1, "/lib.rs")])); |
@@ -84,7 +84,7 @@ fn test_unresolved_module_diagnostic() { | |||
84 | 84 | ||
85 | #[test] | 85 | #[test] |
86 | fn test_unresolved_module_diagnostic_no_diag_for_inline_mode() { | 86 | fn test_unresolved_module_diagnostic_no_diag_for_inline_mode() { |
87 | let mut world = WorldState::new(); | 87 | let mut world = AnalysisHost::new(); |
88 | world.change_file(FileId(1), Some("mod foo {}".to_string())); | 88 | world.change_file(FileId(1), Some("mod foo {}".to_string())); |
89 | 89 | ||
90 | let snap = world.analysis(FileMap(&[(1, "/lib.rs")])); | 90 | let snap = world.analysis(FileMap(&[(1, "/lib.rs")])); |
@@ -97,7 +97,7 @@ fn test_unresolved_module_diagnostic_no_diag_for_inline_mode() { | |||
97 | 97 | ||
98 | #[test] | 98 | #[test] |
99 | fn test_resolve_parent_module() { | 99 | fn test_resolve_parent_module() { |
100 | let mut world = WorldState::new(); | 100 | let mut world = AnalysisHost::new(); |
101 | world.change_file(FileId(1), Some("mod foo;".to_string())); | 101 | world.change_file(FileId(1), Some("mod foo;".to_string())); |
102 | world.change_file(FileId(2), Some("".to_string())); | 102 | world.change_file(FileId(2), Some("".to_string())); |
103 | 103 | ||