diff options
Diffstat (limited to 'crates/ide/src/folding_ranges.rs')
-rw-r--r-- | crates/ide/src/folding_ranges.rs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/crates/ide/src/folding_ranges.rs b/crates/ide/src/folding_ranges.rs index 4b1b24562..379ee5650 100644 --- a/crates/ide/src/folding_ranges.rs +++ b/crates/ide/src/folding_ranges.rs | |||
@@ -457,4 +457,24 @@ calling_function(x,y); | |||
457 | "#, | 457 | "#, |
458 | ) | 458 | ) |
459 | } | 459 | } |
460 | |||
461 | #[test] | ||
462 | fn fold_consecutive_const() { | ||
463 | check( | ||
464 | r#" | ||
465 | <fold consts>const FIRST_CONST: &str = "first"; | ||
466 | const SECOND_CONST: &str = "second";</fold> | ||
467 | "#, | ||
468 | ) | ||
469 | } | ||
470 | |||
471 | #[test] | ||
472 | fn fold_consecutive_static() { | ||
473 | check( | ||
474 | r#" | ||
475 | <fold consts>static FIRST_STATIC: &str = "first"; | ||
476 | static SECOND_STATIC: &str = "second";</fold> | ||
477 | "#, | ||
478 | ) | ||
479 | } | ||
460 | } | 480 | } |