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.rs13
1 files changed, 7 insertions, 6 deletions
diff --git a/crates/ra_ide/src/syntax_highlighting/tests.rs b/crates/ra_ide/src/syntax_highlighting/tests.rs
index b1f48f03b..c8943816f 100644
--- a/crates/ra_ide/src/syntax_highlighting/tests.rs
+++ b/crates/ra_ide/src/syntax_highlighting/tests.rs
@@ -140,16 +140,17 @@ fn accidentally_quadratic() {
140fn test_ranges() { 140fn test_ranges() {
141 let (analysis, file_id) = single_file( 141 let (analysis, file_id) = single_file(
142 r#" 142 r#"
143 #[derive(Clone, Debug)] 143#[derive(Clone, Debug)]
144 struct Foo { 144struct Foo {
145 pub x: i32, 145 pub x: i32,
146 pub y: i32, 146 pub y: i32,
147 }"#, 147}
148"#,
148 ); 149 );
149 150
150 // The "x" 151 // The "x"
151 let highlights = &analysis 152 let highlights = &analysis
152 .highlight_range(FileRange { file_id, range: TextRange::at(82.into(), 1.into()) }) 153 .highlight_range(FileRange { file_id, range: TextRange::at(45.into(), 1.into()) })
153 .unwrap(); 154 .unwrap();
154 155
155 assert_eq!(&highlights[0].highlight.to_string(), "field.declaration"); 156 assert_eq!(&highlights[0].highlight.to_string(), "field.declaration");