Add test code

This commit is contained in:
2024-12-11 16:26:57 -05:00
parent 3d17813eb4
commit b013ba0e55
6 changed files with 135 additions and 0 deletions

21
test/basic-structs.w12 Normal file
View File

@ -0,0 +1,21 @@
struct Test {
a: int,
b: char,
}
fn main() -> int {
var t: Test;
t.a = 5;
t.b = 'a';
printf("t.a = %d\n", t.a);
printf("t.b = %c\n", t.b);
t.a += 3;
t.b = 'b';
printf("t.a = %d\n", t.a);
printf("t.b = %c\n", t.b);
return 0;
}