aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide/src/syntax_highlighting
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2020-06-24 10:05:47 +0100
committerAleksey Kladov <[email protected]>2020-06-24 10:05:47 +0100
commite9cb818c2683e06153f013c3b8d03f7f2719eb02 (patch)
tree1eab8c2aaa60acc56d69e88d2eb888c1395fdbc2 /crates/ra_ide/src/syntax_highlighting
parent08e2149eab4495bd816a30b3caf586bef2cd9649 (diff)
Use fixtures more
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");