aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_lsp_server/tests/heavy_tests/support.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_lsp_server/tests/heavy_tests/support.rs')
-rw-r--r--crates/ra_lsp_server/tests/heavy_tests/support.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/crates/ra_lsp_server/tests/heavy_tests/support.rs b/crates/ra_lsp_server/tests/heavy_tests/support.rs
index d68182174..729067395 100644
--- a/crates/ra_lsp_server/tests/heavy_tests/support.rs
+++ b/crates/ra_lsp_server/tests/heavy_tests/support.rs
@@ -52,6 +52,11 @@ impl<'a> Project<'a> {
52 static INIT: Once = Once::new(); 52 static INIT: Once = Once::new();
53 INIT.call_once(|| { 53 INIT.call_once(|| {
54 let _ = Logger::with_env_or_str(crate::LOG).start().unwrap(); 54 let _ = Logger::with_env_or_str(crate::LOG).start().unwrap();
55 ra_prof::set_filter(if crate::PROFILE.is_empty() {
56 ra_prof::Filter::disabled()
57 } else {
58 ra_prof::Filter::from_spec(&crate::PROFILE)
59 });
55 }); 60 });
56 61
57 let mut paths = vec![]; 62 let mut paths = vec![];
@@ -121,6 +126,15 @@ impl Server {
121 TextDocumentIdentifier { uri: Url::from_file_path(path).unwrap() } 126 TextDocumentIdentifier { uri: Url::from_file_path(path).unwrap() }
122 } 127 }
123 128
129 pub fn notification<N>(&self, params: N::Params)
130 where
131 N: Notification,
132 N::Params: Serialize,
133 {
134 let r = RawNotification::new::<N>(&params);
135 self.send_notification(r)
136 }
137
124 pub fn request<R>(&self, params: R::Params, expected_resp: Value) 138 pub fn request<R>(&self, params: R::Params, expected_resp: Value)
125 where 139 where
126 R: Request, 140 R: Request,