mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-03 07:04:49 +00:00
add test
This commit is contained in:
parent
f0fefde401
commit
b8b9655236
1 changed files with 9 additions and 0 deletions
|
@ -331,6 +331,15 @@ fn ssr_struct_lit() {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn ssr_struct_def() {
|
||||||
|
assert_ssr_transform(
|
||||||
|
"struct Foo { $f: $t } ==>> struct Foo($t);",
|
||||||
|
r#"struct Foo { field: i32 }"#,
|
||||||
|
expect![[r#"struct Foo(i32);"#]],
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn ignores_whitespace() {
|
fn ignores_whitespace() {
|
||||||
assert_matches("1+2", "fn f() -> i32 {1 + 2}", &["1 + 2"]);
|
assert_matches("1+2", "fn f() -> i32 {1 + 2}", &["1 + 2"]);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue