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.
5 lines
443 B
Plaintext
5 lines
443 B
Plaintext
//ww:run-exit 42
|
|
package main;
|
|
fn ss(a: i64, b: i64, c: i64, d: i64, e: i64, f: i64, xs: []i64) i64 = { let i: i32 = 0; let acc: i64 = a + b + c + d + e + f; for (i < xs.len: i32) { acc = acc + xs[i]; i = i + 1; }; return acc; };
|
|
fn main() i32 = { let buf: [3]i64; buf[0] = 100i64; buf[1] = 200i64; buf[2] = 300i64; let s: []i64 = buf[0:3]; let r: i64 = ss(1i64, 2i64, 3i64, 4i64, 5i64, 6i64, s); if (r == 621i64) { return 42; }; return 0; };
|