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:
17
test/wcc/data/r71_struct_byval_two16/case.ww
Normal file
17
test/wcc/data/r71_struct_byval_two16/case.ww
Normal file
@@ -0,0 +1,17 @@
|
||||
//ww:run-exit 7
|
||||
package main;
|
||||
type inst = struct { sec: i64, nsec: i64 };
|
||||
fn cmp(a: inst, b: inst) i32 = {
|
||||
if (a.sec < b.sec) { return -1; };
|
||||
if (a.sec > b.sec) { return 1; };
|
||||
if (a.nsec < b.nsec) { return -1; };
|
||||
if (a.nsec > b.nsec) { return 1; };
|
||||
return 0;
|
||||
};
|
||||
fn main() i32 = {
|
||||
let x: inst = inst { sec = 5i64, nsec = 200i64 };
|
||||
let y: inst = inst { sec = 5i64, nsec = 100i64 };
|
||||
let r: i32 = cmp(x, y);
|
||||
if (r > 0) { return 7; };
|
||||
return 0;
|
||||
};
|
||||
Reference in New Issue
Block a user