This commit is contained in:
Aleksey Kladov 2021-12-27 20:41:17 +03:00
parent f0fefde401
commit b8b9655236

View file

@ -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]
fn ignores_whitespace() {
assert_matches("1+2", "fn f() -> i32 {1 + 2}", &["1 + 2"]);