Skip to content

Commit f6702dd

Browse files
committed
Test cases for folding consts and statics
1 parent ae7de29 commit f6702dd

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

crates/ide/src/folding_ranges.rs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -457,4 +457,24 @@ calling_function(x,y);
457457
"#,
458458
)
459459
}
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+
}
460480
}

0 commit comments

Comments
 (0)