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.
16 lines
465 B
Plaintext
16 lines
465 B
Plaintext
//ww:run-exit 37
|
|
package pkg;
|
|
export type point = struct { x: i64, y: i64 };
|
|
export type rect = struct { lo: point, hi: point };
|
|
package main;
|
|
import pkg;
|
|
export fn main() i32 = {
|
|
let a: pkg.point = pkg.point { x = 3i64, y = 4i64 };
|
|
let b: pkg.point = pkg.point { x = 10i64, y = 20i64 };
|
|
if (a.x != 3i64) { return 1; };
|
|
if (a.y != 4i64) { return 2; };
|
|
if (b.x != 10i64) { return 3; };
|
|
if (b.y != 20i64) { return 4; };
|
|
return (a.x + a.y + b.x + b.y): i32;
|
|
};
|