aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_lsp_server/tests/heavy_tests/main.rs
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2019-08-19 13:42:06 +0100
committerGitHub <[email protected]>2019-08-19 13:42:06 +0100
commitc7d37e424f1e04f87982233f97e1e9385191b7f1 (patch)
tree90a43945782c23458a56a5c01f4adf4586b0ca85 /crates/ra_lsp_server/tests/heavy_tests/main.rs
parent3ba9bc493fad9270dac74250d0b557495fe7d109 (diff)
parent7cd9b1dd7a91fb3b1e400fd4b47333c9699381f7 (diff)
Merge #1703
1703: don't load sysroot in most heavy tests r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_lsp_server/tests/heavy_tests/main.rs')
-rw-r--r--crates/ra_lsp_server/tests/heavy_tests/main.rs13
1 files changed, 9 insertions, 4 deletions
diff --git a/crates/ra_lsp_server/tests/heavy_tests/main.rs b/crates/ra_lsp_server/tests/heavy_tests/main.rs
index 451be32a8..de3bd5bc5 100644
--- a/crates/ra_lsp_server/tests/heavy_tests/main.rs
+++ b/crates/ra_lsp_server/tests/heavy_tests/main.rs
@@ -22,7 +22,7 @@ const PROFILE: &'static str = "";
22#[test] 22#[test]
23fn completes_items_from_standard_library() { 23fn completes_items_from_standard_library() {
24 let project_start = Instant::now(); 24 let project_start = Instant::now();
25 let server = project( 25 let server = Project::with_fixture(
26 r#" 26 r#"
27//- Cargo.toml 27//- Cargo.toml
28[package] 28[package]
@@ -32,7 +32,9 @@ version = "0.0.0"
32//- src/lib.rs 32//- src/lib.rs
33use std::collections::Spam; 33use std::collections::Spam;
34"#, 34"#,
35 ); 35 )
36 .with_sysroot(true)
37 .server();
36 server.wait_until_workspace_is_loaded(); 38 server.wait_until_workspace_is_loaded();
37 eprintln!("loading took {:?}", project_start.elapsed()); 39 eprintln!("loading took {:?}", project_start.elapsed());
38 let completion_start = Instant::now(); 40 let completion_start = Instant::now();
@@ -349,7 +351,7 @@ fn main() {{}}
349fn diagnostics_dont_block_typing() { 351fn diagnostics_dont_block_typing() {
350 let librs: String = (0..10).map(|i| format!("mod m{};", i)).collect(); 352 let librs: String = (0..10).map(|i| format!("mod m{};", i)).collect();
351 let libs: String = (0..10).map(|i| format!("//- src/m{}.rs\nfn foo() {{}}\n\n", i)).collect(); 353 let libs: String = (0..10).map(|i| format!("//- src/m{}.rs\nfn foo() {{}}\n\n", i)).collect();
352 let server = project(&format!( 354 let server = Project::with_fixture(&format!(
353 r#" 355 r#"
354//- Cargo.toml 356//- Cargo.toml
355[package] 357[package]
@@ -364,7 +366,10 @@ version = "0.0.0"
364fn main() {{}} 366fn main() {{}}
365"#, 367"#,
366 librs, libs 368 librs, libs
367 )); 369 ))
370 .with_sysroot(true)
371 .server();
372
368 server.wait_until_workspace_is_loaded(); 373 server.wait_until_workspace_is_loaded();
369 for i in 0..10 { 374 for i in 0..10 {
370 server.notification::<DidOpenTextDocument>(DidOpenTextDocumentParams { 375 server.notification::<DidOpenTextDocument>(DidOpenTextDocumentParams {