aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--crates/libanalysis/tests/tests.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/crates/libanalysis/tests/tests.rs b/crates/libanalysis/tests/tests.rs
index 2f1299463..887e13fa3 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::{AnalysisHost, FileId, FileResolver}; 8use libanalysis::{AnalysisHost, FileId, FileResolver, JobHandle};
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)]);
@@ -45,7 +45,8 @@ fn test_resolve_module() {
45 (1, "/lib.rs"), 45 (1, "/lib.rs"),
46 (2, "/foo.rs"), 46 (2, "/foo.rs"),
47 ])); 47 ]));
48 let symbols = snap.approximately_resolve_symbol(FileId(1), 4.into()); 48 let (_handle, token) = JobHandle::new();
49 let symbols = snap.approximately_resolve_symbol(FileId(1), 4.into(), &token);
49 assert_eq_dbg( 50 assert_eq_dbg(
50 r#"[(FileId(2), FileSymbol { name: "foo", node_range: [0; 0), kind: MODULE })]"#, 51 r#"[(FileId(2), FileSymbol { name: "foo", node_range: [0; 0), kind: MODULE })]"#,
51 &symbols, 52 &symbols,
@@ -55,7 +56,7 @@ fn test_resolve_module() {
55 (1, "/lib.rs"), 56 (1, "/lib.rs"),
56 (2, "/foo/mod.rs") 57 (2, "/foo/mod.rs")
57 ])); 58 ]));
58 let symbols = snap.approximately_resolve_symbol(FileId(1), 4.into()); 59 let symbols = snap.approximately_resolve_symbol(FileId(1), 4.into(), &token);
59 assert_eq_dbg( 60 assert_eq_dbg(
60 r#"[(FileId(2), FileSymbol { name: "foo", node_range: [0; 0), kind: MODULE })]"#, 61 r#"[(FileId(2), FileSymbol { name: "foo", node_range: [0; 0), kind: MODULE })]"#,
61 &symbols, 62 &symbols,