ide: add a new test

This commit is contained in:
Alex Kladov 2024-04-16 16:31:29 +01:00
parent 9bd8eee21e
commit f852a6fc7d

View File

@ -350,6 +350,27 @@ fn test() {
);
}
#[test]
fn test_access() {
check(
r#"
struct S { f$0: u32 }
#[test]
fn test() {
let mut x = S { f: 92 };
x.f = 92;
}
"#,
expect![[r#"
f Field FileId(0) 11..17 11..12
FileId(0) 61..62 read test
FileId(0) 76..77 write test
"#]],
);
}
#[test]
fn test_struct_literal_after_space() {
check(