From 5d23d8bc299b718e7f026a7e6c1363dde3342817 Mon Sep 17 00:00:00 2001 From: vsrs Date: Sat, 27 Feb 2021 17:59:52 +0300 Subject: Add runnables::related_tests --- crates/ide/src/lib.rs | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'crates/ide/src/lib.rs') diff --git a/crates/ide/src/lib.rs b/crates/ide/src/lib.rs index b600178ee..baa80cf43 100644 --- a/crates/ide/src/lib.rs +++ b/crates/ide/src/lib.rs @@ -445,6 +445,15 @@ impl Analysis { self.with_db(|db| runnables::runnables(db, file_id)) } + /// Returns the set of tests for the given file position. + pub fn related_tests( + &self, + position: FilePosition, + search_scope: Option, + ) -> Cancelable> { + self.with_db(|db| runnables::related_tests(db, position, search_scope)) + } + /// Computes syntax highlighting for the given file pub fn highlight(&self, file_id: FileId) -> Cancelable> { self.with_db(|db| syntax_highlighting::highlight(db, file_id, None, false)) -- cgit v1.2.3