mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 12:29:21 +00:00
Test cases for folding consts and statics
This commit is contained in:
parent
ae7de296ae
commit
f6702dda9a
1 changed files with 20 additions and 0 deletions
|
@ -457,4 +457,24 @@ calling_function(x,y);
|
||||||
"#,
|
"#,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn fold_consecutive_const() {
|
||||||
|
check(
|
||||||
|
r#"
|
||||||
|
<fold consts>const FIRST_CONST: &str = "first";
|
||||||
|
const SECOND_CONST: &str = "second";</fold>
|
||||||
|
"#,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn fold_consecutive_static() {
|
||||||
|
check(
|
||||||
|
r#"
|
||||||
|
<fold consts>static FIRST_STATIC: &str = "first";
|
||||||
|
static SECOND_STATIC: &str = "second";</fold>
|
||||||
|
"#,
|
||||||
|
)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue