diff options
author | Aleksey Kladov <[email protected]> | 2018-08-31 10:13:02 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2018-08-31 10:13:02 +0100 |
commit | faebae74e48e3e7e0d3dfddc5b5cf0b18535cc6b (patch) | |
tree | ca1868a06529489514b0dd8dd1e2be563c14f657 /crates/libanalysis/tests | |
parent | d999f4b56803b613dcf354862e1db4b5d2a8a8d0 (diff) |
fix tests
Diffstat (limited to 'crates/libanalysis/tests')
-rw-r--r-- | crates/libanalysis/tests/tests.rs | 7 |
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; | |||
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::{AnalysisHost, FileId, FileResolver}; | 8 | use libanalysis::{AnalysisHost, FileId, FileResolver, JobHandle}; |
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)]); |
@@ -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, |