mirror of
https://git.sfja.dk/Mikkel/slige.git
synced 2025-01-18 18:16:31 +00:00
21 lines
360 B
Plaintext
21 lines
360 B
Plaintext
mod std;
|
|
|
|
fn main() {
|
|
let d = true;
|
|
|
|
let v = struct {
|
|
a: 123,
|
|
b: struct {
|
|
c: "foo",
|
|
d: d,
|
|
},
|
|
};
|
|
|
|
std::assert(v.a == 123, "test field");
|
|
std::assert(v.b.c == "foo", "test nested field");
|
|
std::assert(v.b.d == true, "test resolved field");
|
|
|
|
std::println("tests ran successfully");
|
|
}
|
|
|