aboutsummaryrefslogtreecommitdiff
path: root/crates/libanalysis/tests/tests.rs
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2018-08-30 11:12:49 +0100
committerAleksey Kladov <[email protected]>2018-08-30 11:12:49 +0100
commitc2c64145cb0487b20b79d4bf470cda7e39fcb236 (patch)
tree133c220acab90d756ed48cc1951ed3752026e297 /crates/libanalysis/tests/tests.rs
parent1f2fb4e27f8ba1cb7b1d96a332b7ffc2ee659921 (diff)
move
Diffstat (limited to 'crates/libanalysis/tests/tests.rs')
-rw-r--r--crates/libanalysis/tests/tests.rs10
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;
5use std::path::{Path}; 5use std::path::{Path};
6 6
7use relative_path::RelativePath; 7use relative_path::RelativePath;
8use libanalysis::{WorldState, FileId, FileResolver}; 8use libanalysis::{AnalysisHost, FileId, FileResolver};
9use test_utils::assert_eq_dbg; 9use test_utils::assert_eq_dbg;
10 10
11struct FileMap(&'static [(u32, &'static str)]); 11struct FileMap(&'static [(u32, &'static str)]);
@@ -37,7 +37,7 @@ impl FileResolver for FileMap {
37 37
38#[test] 38#[test]
39fn test_resolve_module() { 39fn 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]
66fn test_unresolved_module_diagnostic() { 66fn 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]
86fn test_unresolved_module_diagnostic_no_diag_for_inline_mode() { 86fn 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]
99fn test_resolve_parent_module() { 99fn 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