test/wcc/data: grow the declarative compiler corpus to 1,224 fixtures

The r-prefixed waves absorb the runtime, reject, and byte-compare rows
of the migrated native carriers; each fixture is one directory with one
case.ww and a //ww:error, //ww:compile, //ww:run, or //ww:run-exit
directive covering both frontends.
This commit is contained in:
2026-08-07 23:02:09 +09:00
parent 350bcd8913
commit d456263f7e
1119 changed files with 9847 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
//ww:run
package main;
fn variadic_foo(a: i32, xs: i32...) i32 = {
return a + xs.len;
};
fn scalar_foo(a: i32, n: (u8 | []u8)) i32 = {
match (n) {
case let c: u8 => return a + (c: i32);
case let s: []u8 => return a + s.len;
};
return 0;
};
export fn main() i32 = {
let n: (u8 | []u8) = 5u8;
let a: i32 = variadic_foo(1, 2, 3, 4);
let b: i32 = scalar_foo(10, n);
if (a != 4) { return 30; };
if (b != 15) { return 31; };
return 0;
};