aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_lsp_server/tests/heavy_tests/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_lsp_server/tests/heavy_tests/main.rs')
-rw-r--r--crates/ra_lsp_server/tests/heavy_tests/main.rs23
1 files changed, 13 insertions, 10 deletions
diff --git a/crates/ra_lsp_server/tests/heavy_tests/main.rs b/crates/ra_lsp_server/tests/heavy_tests/main.rs
index 7265b5999..8e566d3c8 100644
--- a/crates/ra_lsp_server/tests/heavy_tests/main.rs
+++ b/crates/ra_lsp_server/tests/heavy_tests/main.rs
@@ -1,12 +1,12 @@
1#[macro_use] 1#[macro_use]
2extern crate crossbeam_channel; 2extern crate crossbeam_channel;
3extern crate tempdir; 3extern crate flexi_logger;
4extern crate gen_lsp_server;
4extern crate languageserver_types; 5extern crate languageserver_types;
6extern crate ra_lsp_server;
5extern crate serde; 7extern crate serde;
6extern crate serde_json; 8extern crate serde_json;
7extern crate gen_lsp_server; 9extern crate tempdir;
8extern crate flexi_logger;
9extern crate ra_lsp_server;
10 10
11mod support; 11mod support;
12 12
@@ -14,17 +14,18 @@ use ra_lsp_server::req::{Runnables, RunnablesParams};
14 14
15use crate::support::project; 15use crate::support::project;
16 16
17
18const LOG: &'static str = ""; 17const LOG: &'static str = "";
19 18
20#[test] 19#[test]
21fn test_runnables_no_project() { 20fn test_runnables_no_project() {
22 let server = project(r" 21 let server = project(
22 r"
23//- lib.rs 23//- lib.rs
24#[test] 24#[test]
25fn foo() { 25fn foo() {
26} 26}
27"); 27",
28 );
28 server.request::<Runnables>( 29 server.request::<Runnables>(
29 RunnablesParams { 30 RunnablesParams {
30 text_document: server.doc_id("lib.rs"), 31 text_document: server.doc_id("lib.rs"),
@@ -41,13 +42,14 @@ fn foo() {
41 "start": { "character": 0, "line": 0 } 42 "start": { "character": 0, "line": 0 }
42 } 43 }
43 } 44 }
44 ]"# 45 ]"#,
45 ); 46 );
46} 47}
47 48
48#[test] 49#[test]
49fn test_runnables_project() { 50fn test_runnables_project() {
50 let server = project(r#" 51 let server = project(
52 r#"
51//- Cargo.toml 53//- Cargo.toml
52[package] 54[package]
53name = "foo" 55name = "foo"
@@ -59,7 +61,8 @@ pub fn foo() {}
59//- tests/spam.rs 61//- tests/spam.rs
60#[test] 62#[test]
61fn test_eggs() {} 63fn test_eggs() {}
62"#); 64"#,
65 );
63 server.wait_for_feedback("workspace loaded"); 66 server.wait_for_feedback("workspace loaded");
64 server.request::<Runnables>( 67 server.request::<Runnables>(
65 RunnablesParams { 68 RunnablesParams {