aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide/src/syntax_highlighting/tests.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_ide/src/syntax_highlighting/tests.rs')
-rw-r--r--crates/ra_ide/src/syntax_highlighting/tests.rs14
1 files changed, 12 insertions, 2 deletions
diff --git a/crates/ra_ide/src/syntax_highlighting/tests.rs b/crates/ra_ide/src/syntax_highlighting/tests.rs
index 070b24f45..062b3ff4a 100644
--- a/crates/ra_ide/src/syntax_highlighting/tests.rs
+++ b/crates/ra_ide/src/syntax_highlighting/tests.rs
@@ -287,7 +287,13 @@ fn main() {
287fn test_highlight_doctest() { 287fn test_highlight_doctest() {
288 check_highlighting( 288 check_highlighting(
289 r#" 289 r#"
290struct Foo {
291 bar: bool,
292}
293
290impl Foo { 294impl Foo {
295 pub const bar: bool = true;
296
291 /// Constructs a new `Foo`. 297 /// Constructs a new `Foo`.
292 /// 298 ///
293 /// # Examples 299 /// # Examples
@@ -297,7 +303,7 @@ impl Foo {
297 /// let mut foo: Foo = Foo::new(); 303 /// let mut foo: Foo = Foo::new();
298 /// ``` 304 /// ```
299 pub const fn new() -> Foo { 305 pub const fn new() -> Foo {
300 Foo { } 306 Foo { bar: true }
301 } 307 }
302 308
303 /// `bar` method on `Foo`. 309 /// `bar` method on `Foo`.
@@ -305,11 +311,15 @@ impl Foo {
305 /// # Examples 311 /// # Examples
306 /// 312 ///
307 /// ``` 313 /// ```
314 /// use x::y;
315 ///
308 /// let foo = Foo::new(); 316 /// let foo = Foo::new();
309 /// 317 ///
310 /// // calls bar on foo 318 /// // calls bar on foo
311 /// assert!(foo.bar()); 319 /// assert!(foo.bar());
312 /// 320 ///
321 /// let bar = foo.bar || Foo::bar;
322 ///
313 /// /* multi-line 323 /// /* multi-line
314 /// comment */ 324 /// comment */
315 /// 325 ///
@@ -330,7 +340,7 @@ impl Foo {
330 .trim(), 340 .trim(),
331 "crates/ra_ide/src/snapshots/highlight_doctest.html", 341 "crates/ra_ide/src/snapshots/highlight_doctest.html",
332 false, 342 false,
333 ) 343 );
334} 344}
335 345
336/// Highlights the code given by the `ra_fixture` argument, renders the 346/// Highlights the code given by the `ra_fixture` argument, renders the