From f6702dda9a9527437475e130a01340566ccaf28a Mon Sep 17 00:00:00 2001 From: Ayomide Bamidele Date: Mon, 29 Mar 2021 11:43:03 +0100 Subject: [PATCH] Test cases for folding consts and statics --- crates/ide/src/folding_ranges.rs | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/crates/ide/src/folding_ranges.rs b/crates/ide/src/folding_ranges.rs index 4b1b2456283..379ee56502e 100644 --- a/crates/ide/src/folding_ranges.rs +++ b/crates/ide/src/folding_ranges.rs @@ -457,4 +457,24 @@ calling_function(x,y); "#, ) } + + #[test] + fn fold_consecutive_const() { + check( + r#" +const FIRST_CONST: &str = "first"; +const SECOND_CONST: &str = "second"; + "#, + ) + } + + #[test] + fn fold_consecutive_static() { + check( + r#" +static FIRST_STATIC: &str = "first"; +static SECOND_STATIC: &str = "second"; + "#, + ) + } }