aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_lsp_server/tests/heavy_tests
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_lsp_server/tests/heavy_tests')
-rw-r--r--crates/ra_lsp_server/tests/heavy_tests/support.rs8
1 files changed, 5 insertions, 3 deletions
diff --git a/crates/ra_lsp_server/tests/heavy_tests/support.rs b/crates/ra_lsp_server/tests/heavy_tests/support.rs
index f4e7eaf75..3a7c50309 100644
--- a/crates/ra_lsp_server/tests/heavy_tests/support.rs
+++ b/crates/ra_lsp_server/tests/heavy_tests/support.rs
@@ -13,6 +13,7 @@ use lsp_types::{
13 notification::DidOpenTextDocument, 13 notification::DidOpenTextDocument,
14 request::{Request, Shutdown}, 14 request::{Request, Shutdown},
15 DidOpenTextDocumentParams, TextDocumentIdentifier, TextDocumentItem, Url, 15 DidOpenTextDocumentParams, TextDocumentIdentifier, TextDocumentItem, Url,
16 notification::{Notification, ShowMessage},
16}; 17};
17use serde::Serialize; 18use serde::Serialize;
18use serde_json::{to_string_pretty, Value}; 19use serde_json::{to_string_pretty, Value};
@@ -56,7 +57,7 @@ impl Server {
56 "test server", 57 "test server",
57 128, 58 128,
58 move |mut msg_receiver, mut msg_sender| { 59 move |mut msg_receiver, mut msg_sender| {
59 main_loop(true, path, true, &mut msg_receiver, &mut msg_sender).unwrap() 60 main_loop(path, true, &mut msg_receiver, &mut msg_sender).unwrap()
60 }, 61 },
61 ); 62 );
62 let res = Server { 63 let res = Server {
@@ -138,8 +139,9 @@ impl Server {
138 } 139 }
139 pub fn wait_for_feedback_n(&self, feedback: &str, n: usize) { 140 pub fn wait_for_feedback_n(&self, feedback: &str, n: usize) {
140 let f = |msg: &RawMessage| match msg { 141 let f = |msg: &RawMessage| match msg {
141 RawMessage::Notification(n) if n.method == "internalFeedback" => { 142 RawMessage::Notification(n) if n.method == ShowMessage::METHOD => {
142 return n.clone().cast::<req::InternalFeedback>().unwrap() == feedback; 143 let message = n.clone().cast::<req::ShowMessage>().unwrap();
144 message.message == feedback
143 } 145 }
144 _ => false, 146 _ => false,
145 }; 147 };