From faebae74e48e3e7e0d3dfddc5b5cf0b18535cc6b Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Fri, 31 Aug 2018 12:13:02 +0300 Subject: fix tests --- crates/libanalysis/tests/tests.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'crates/libanalysis') 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; use std::path::{Path}; use relative_path::RelativePath; -use libanalysis::{AnalysisHost, FileId, FileResolver}; +use libanalysis::{AnalysisHost, FileId, FileResolver, JobHandle}; use test_utils::assert_eq_dbg; struct FileMap(&'static [(u32, &'static str)]); @@ -45,7 +45,8 @@ fn test_resolve_module() { (1, "/lib.rs"), (2, "/foo.rs"), ])); - let symbols = snap.approximately_resolve_symbol(FileId(1), 4.into()); + let (_handle, token) = JobHandle::new(); + let symbols = snap.approximately_resolve_symbol(FileId(1), 4.into(), &token); assert_eq_dbg( r#"[(FileId(2), FileSymbol { name: "foo", node_range: [0; 0), kind: MODULE })]"#, &symbols, @@ -55,7 +56,7 @@ fn test_resolve_module() { (1, "/lib.rs"), (2, "/foo/mod.rs") ])); - let symbols = snap.approximately_resolve_symbol(FileId(1), 4.into()); + let symbols = snap.approximately_resolve_symbol(FileId(1), 4.into(), &token); assert_eq_dbg( r#"[(FileId(2), FileSymbol { name: "foo", node_range: [0; 0), kind: MODULE })]"#, &symbols, -- cgit v1.2.3