aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide/src/syntax_highlighting
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_ide/src/syntax_highlighting')
-rw-r--r--crates/ra_ide/src/syntax_highlighting/tests.rs11
1 files changed, 3 insertions, 8 deletions
diff --git a/crates/ra_ide/src/syntax_highlighting/tests.rs b/crates/ra_ide/src/syntax_highlighting/tests.rs
index c8943816f..b7fad9719 100644
--- a/crates/ra_ide/src/syntax_highlighting/tests.rs
+++ b/crates/ra_ide/src/syntax_highlighting/tests.rs
@@ -2,10 +2,7 @@ use std::fs;
2 2
3use test_utils::{assert_eq_text, project_dir, read_text}; 3use test_utils::{assert_eq_text, project_dir, read_text};
4 4
5use crate::{ 5use crate::{mock_analysis::single_file, FileRange, TextRange};
6 mock_analysis::{single_file, MockAnalysis},
7 FileRange, TextRange,
8};
9 6
10#[test] 7#[test]
11fn test_highlighting() { 8fn test_highlighting() {
@@ -127,12 +124,10 @@ fn accidentally_quadratic() {
127 let file = project_dir().join("crates/ra_syntax/test_data/accidentally_quadratic"); 124 let file = project_dir().join("crates/ra_syntax/test_data/accidentally_quadratic");
128 let src = fs::read_to_string(file).unwrap(); 125 let src = fs::read_to_string(file).unwrap();
129 126
130 let mut mock = MockAnalysis::new(); 127 let (analysis, file_id) = single_file(&src);
131 let file_id = mock.add_file("/main.rs", &src);
132 let host = mock.analysis_host();
133 128
134 // let t = std::time::Instant::now(); 129 // let t = std::time::Instant::now();
135 let _ = host.analysis().highlight(file_id).unwrap(); 130 let _ = analysis.highlight(file_id).unwrap();
136 // eprintln!("elapsed: {:?}", t.elapsed()); 131 // eprintln!("elapsed: {:?}", t.elapsed());
137} 132}
138 133