mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Update tests to (Foo) { ... } syntax.
This commit is contained in:
@@ -9,7 +9,7 @@ bitstruct Foo : int
|
||||
fn void main()
|
||||
{
|
||||
Foo f;
|
||||
int z = (int) Foo { .abc = 2, .defg = 1 };
|
||||
int z = (int) (Foo) { .abc = 2, .defg = 1 };
|
||||
}
|
||||
|
||||
/* #expect: test.ll
|
||||
|
||||
@@ -23,7 +23,7 @@ fn void main()
|
||||
io::printfn("%s %s", f3.a, f3.b);
|
||||
Foo f4 = (f1 | ~f2) ^ f3;
|
||||
io::printfn("%s %s", f4.a, f4.b);
|
||||
Foo f5 = Foo { true, false } | Foo { false, true };
|
||||
Foo f5 = (Foo) { true, false } | (Foo) { false, true };
|
||||
io::printfn("%s %s", f5.a, f5.b);
|
||||
|
||||
f5 &= f2;
|
||||
@@ -36,7 +36,7 @@ fn void main()
|
||||
io::printfn("%s %s %s", b3.z, b3.w, b3.gh);
|
||||
b3 = ~b3;
|
||||
io::printfn("%s %s %s", b3.z, b3.w, b3.gh);
|
||||
b3 ^= Bar { true, true, false };
|
||||
b3 ^= (Bar) { true, true, false };
|
||||
io::printfn("%s %s %s", b3.z, b3.w, b3.gh);
|
||||
}
|
||||
|
||||
|
||||
@@ -39,10 +39,10 @@ struct Foo4
|
||||
fn void main()
|
||||
{
|
||||
void* foo;
|
||||
Foo *f = &&Foo { .expand = 2, .widget = &f };
|
||||
Foo2 *f2 = &&Foo2 { .expand = 2, .widget = &f };
|
||||
Foo3 *f3 = &&Foo3 { .expand = 2, .a = true, .b = true, .widget = &f };
|
||||
Foo4 *f4 = &&Foo4 { .expand = 2, .a = true, .b = true, .widget = &f };
|
||||
Foo *f = &&(Foo) { .expand = 2, .widget = &f };
|
||||
Foo2 *f2 = &&(Foo2) { .expand = 2, .widget = &f };
|
||||
Foo3 *f3 = &&(Foo3) { .expand = 2, .a = true, .b = true, .widget = &f };
|
||||
Foo4 *f4 = &&(Foo4) { .expand = 2, .a = true, .b = true, .widget = &f };
|
||||
}
|
||||
|
||||
/* #expect: testing.ll
|
||||
|
||||
Reference in New Issue
Block a user