aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAyomide Bamidele <[email protected]>2021-03-29 11:43:03 +0100
committerAyomide Bamidele <[email protected]>2021-03-29 11:43:03 +0100
commitf6702dda9a9527437475e130a01340566ccaf28a (patch)
tree56f749b36adc8d1698ddddbb32d553983c8bba2f
parentae7de296ae476708781ac367e0406454c8e6c335 (diff)
Test cases for folding consts and statics
-rw-r--r--crates/ide/src/folding_ranges.rs20
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";
466const 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";
476static SECOND_STATIC: &str = "second";</fold>
477 "#,
478 )
479 }
460} 480}