test: migrate 24 residual carriers into the fixture corpus
Audit-driven migrate-and-retire wave (one read-only auditor per carrier batch, verdicts row-checked through the full corpus gate): every retired carrier's assertions are now owned by declarative fixtures or an existing owner. 238 new fixtures land (corpus 1,239 -> 1,477; cells 2,954), covering enum/str/slice/tagged array elements, inferred-length arrays, global slice/str zero-init and literals, global array/pointer field reads and stores, struct-literal slice fields, struct returns, float arithmetic, size/int limits, sort and log-vstream behavior, place-addressed stores, and append places. Rejection rows STRENGTHEN the old nonzero-exit checks to required diagnostic fragments; all byte-id claims fold into the blanket test-data-byteid sweep (now 1,142 compared, 0 pinned-divergent). Four carriers were fully redundant with existing fixtures/lang tests (749, 722, 765, and 771's byteid rows) and retire without new rows. Native carriers 171 -> 147 (residual 135 -> 111).
This commit is contained in:
8
test/wcc/data/r682_enum_frame_smash/case.ww
Normal file
8
test/wcc/data/r682_enum_frame_smash/case.ww
Normal file
@@ -0,0 +1,8 @@
|
||||
//ww:run-exit 5
|
||||
package main;
|
||||
type tk = enum i32 { A = 7i32, B = 21i32, C = 99i32,
|
||||
D = 3i32, E = 11i32, F = 5i32 };
|
||||
fn main() i32 = {
|
||||
let a: [6]tk = [tk.A, tk.B, tk.C, tk.D, tk.E, tk.F];
|
||||
return a[5]: i32;
|
||||
};
|
||||
7
test/wcc/data/r682_enum_global_idx0/case.ww
Normal file
7
test/wcc/data/r682_enum_global_idx0/case.ww
Normal file
@@ -0,0 +1,7 @@
|
||||
//ww:run-exit 7
|
||||
package main;
|
||||
type tk = enum i32 { A = 7i32, B = 21i32, C = 99i32, D = 3i32 };
|
||||
let g: [4]tk = [tk.A, tk.B, tk.C, tk.D];
|
||||
fn main() i32 = {
|
||||
return g[0]: i32;
|
||||
};
|
||||
7
test/wcc/data/r682_enum_global_read/case.ww
Normal file
7
test/wcc/data/r682_enum_global_read/case.ww
Normal file
@@ -0,0 +1,7 @@
|
||||
//ww:run-exit 99
|
||||
package main;
|
||||
type tk = enum i32 { A = 7i32, B = 21i32, C = 99i32, D = 3i32 };
|
||||
let g: [4]tk = [tk.A, tk.B, tk.C, tk.D];
|
||||
fn main() i32 = {
|
||||
return g[2]: i32;
|
||||
};
|
||||
7
test/wcc/data/r682_enum_local_init_sum/case.ww
Normal file
7
test/wcc/data/r682_enum_local_init_sum/case.ww
Normal file
@@ -0,0 +1,7 @@
|
||||
//ww:run-exit 10
|
||||
package main;
|
||||
type tk = enum i32 { A = 7i32, B = 21i32, C = 99i32, D = 3i32 };
|
||||
fn main() i32 = {
|
||||
let a: [4]tk = [tk.A, tk.B, tk.C, tk.D];
|
||||
return (a[0]: i32) + (a[3]: i32);
|
||||
};
|
||||
7
test/wcc/data/r682_enum_local_read/case.ww
Normal file
7
test/wcc/data/r682_enum_local_read/case.ww
Normal file
@@ -0,0 +1,7 @@
|
||||
//ww:run-exit 21
|
||||
package main;
|
||||
type tk = enum i32 { A = 7i32, B = 21i32, C = 99i32, D = 3i32 };
|
||||
fn main() i32 = {
|
||||
let a: [4]tk = [tk.A, tk.B, tk.C, tk.D];
|
||||
return a[1]: i32;
|
||||
};
|
||||
7
test/wcc/data/r682_enum_local_signed/case.ww
Normal file
7
test/wcc/data/r682_enum_local_signed/case.ww
Normal file
@@ -0,0 +1,7 @@
|
||||
//ww:run-exit 251
|
||||
package main;
|
||||
type tk = enum i32 { A = 7i32, G = -5i32 };
|
||||
fn main() i32 = {
|
||||
let a: [2]tk = [tk.G, tk.A];
|
||||
return a[0]: i32;
|
||||
};
|
||||
7
test/wcc/data/r682_enum_width1_u8/case.ww
Normal file
7
test/wcc/data/r682_enum_width1_u8/case.ww
Normal file
@@ -0,0 +1,7 @@
|
||||
//ww:run-exit 200
|
||||
package main;
|
||||
type tu = enum u8 { A = 7u8, B = 200u8, C = 3u8 };
|
||||
fn main() i32 = {
|
||||
let a: [3]tu = [tu.A, tu.B, tu.C];
|
||||
return a[1]: i32;
|
||||
};
|
||||
7
test/wcc/data/r682_enum_width2_i16/case.ww
Normal file
7
test/wcc/data/r682_enum_width2_i16/case.ww
Normal file
@@ -0,0 +1,7 @@
|
||||
//ww:run-exit 251
|
||||
package main;
|
||||
type ts = enum i16 { A = 7i16, G = -5i16, C = 99i16 };
|
||||
fn main() i32 = {
|
||||
let a: [3]ts = [ts.A, ts.G, ts.C];
|
||||
return a[1]: i32;
|
||||
};
|
||||
10
test/wcc/data/r683_slice_cap_copy/case.ww
Normal file
10
test/wcc/data/r683_slice_cap_copy/case.ww
Normal file
@@ -0,0 +1,10 @@
|
||||
//ww:run-exit 7
|
||||
package main;
|
||||
export fn main() i32 = {
|
||||
let hb: [8]u8;
|
||||
let a: []u8; a.ptr = &hb[0]; a.len = 3; a.cap = 7;
|
||||
let b: []u8; b.ptr = &hb[0]; b.len = 2; b.cap = 6;
|
||||
let t: [2][]u8 = [a, b];
|
||||
let q: []u8 = t[0];
|
||||
return q.cap: i32;
|
||||
};
|
||||
9
test/wcc/data/r683_slice_cap_direct0/case.ww
Normal file
9
test/wcc/data/r683_slice_cap_direct0/case.ww
Normal file
@@ -0,0 +1,9 @@
|
||||
//ww:run-exit 7
|
||||
package main;
|
||||
export fn main() i32 = {
|
||||
let hb: [8]u8;
|
||||
let a: []u8; a.ptr = &hb[0]; a.len = 3; a.cap = 7;
|
||||
let b: []u8; b.ptr = &hb[0]; b.len = 2; b.cap = 6;
|
||||
let t: [2][]u8 = [a, b];
|
||||
return t[0].cap: i32;
|
||||
};
|
||||
9
test/wcc/data/r683_slice_cap_direct1/case.ww
Normal file
9
test/wcc/data/r683_slice_cap_direct1/case.ww
Normal file
@@ -0,0 +1,9 @@
|
||||
//ww:run-exit 6
|
||||
package main;
|
||||
export fn main() i32 = {
|
||||
let hb: [8]u8;
|
||||
let a: []u8; a.ptr = &hb[0]; a.len = 3; a.cap = 7;
|
||||
let b: []u8; b.ptr = &hb[0]; b.len = 2; b.cap = 6;
|
||||
let t: [2][]u8 = [a, b];
|
||||
return t[1].cap: i32;
|
||||
};
|
||||
9
test/wcc/data/r683_slice_len0/case.ww
Normal file
9
test/wcc/data/r683_slice_len0/case.ww
Normal file
@@ -0,0 +1,9 @@
|
||||
//ww:run-exit 3
|
||||
package main;
|
||||
export fn main() i32 = {
|
||||
let hb: [8]u8;
|
||||
let a: []u8; a.ptr = &hb[0]; a.len = 3; a.cap = 8;
|
||||
let b: []u8; b.ptr = &hb[0]; b.len = 2; b.cap = 8;
|
||||
let t: [2][]u8 = [a, b];
|
||||
return t[0].len: i32;
|
||||
};
|
||||
9
test/wcc/data/r683_slice_len1/case.ww
Normal file
9
test/wcc/data/r683_slice_len1/case.ww
Normal file
@@ -0,0 +1,9 @@
|
||||
//ww:run-exit 2
|
||||
package main;
|
||||
export fn main() i32 = {
|
||||
let hb: [8]u8;
|
||||
let a: []u8; a.ptr = &hb[0]; a.len = 3; a.cap = 8;
|
||||
let b: []u8; b.ptr = &hb[0]; b.len = 2; b.cap = 8;
|
||||
let t: [2][]u8 = [a, b];
|
||||
return t[1].len: i32;
|
||||
};
|
||||
10
test/wcc/data/r683_slice_ptr/case.ww
Normal file
10
test/wcc/data/r683_slice_ptr/case.ww
Normal file
@@ -0,0 +1,10 @@
|
||||
//ww:run-exit 4
|
||||
package main;
|
||||
export fn main() i32 = {
|
||||
let hb: [8]u8; hb[0] = 9u8; hb[1] = 4u8;
|
||||
let a: []u8; a.ptr = &hb[0]; a.len = 3; a.cap = 8;
|
||||
let b: []u8; b.ptr = &hb[1]; b.len = 2; b.cap = 8;
|
||||
let t: [2][]u8 = [a, b];
|
||||
let q: []u8 = t[1];
|
||||
return q[0]: i32;
|
||||
};
|
||||
10
test/wcc/data/r683_slice_stride3/case.ww
Normal file
10
test/wcc/data/r683_slice_stride3/case.ww
Normal file
@@ -0,0 +1,10 @@
|
||||
//ww:run-exit 7
|
||||
package main;
|
||||
export fn main() i32 = {
|
||||
let hb: [8]u8;
|
||||
let a: []u8; a.ptr = &hb[0]; a.len = 3; a.cap = 8;
|
||||
let b: []u8; b.ptr = &hb[0]; b.len = 5; b.cap = 8;
|
||||
let c: []u8; c.ptr = &hb[0]; c.len = 7; c.cap = 8;
|
||||
let t: [3][]u8 = [a, b, c];
|
||||
return t[2].len: i32;
|
||||
};
|
||||
9
test/wcc/data/r683_str_cap_copy/case.ww
Normal file
9
test/wcc/data/r683_str_cap_copy/case.ww
Normal file
@@ -0,0 +1,9 @@
|
||||
//ww:run-exit 5
|
||||
package main;
|
||||
export fn main() i32 = {
|
||||
let a: str = "abcde";
|
||||
let b: str = "xy";
|
||||
let t: [2]str = [a, b];
|
||||
let q: str = t[0];
|
||||
return q.cap: i32;
|
||||
};
|
||||
8
test/wcc/data/r683_str_cap_direct0/case.ww
Normal file
8
test/wcc/data/r683_str_cap_direct0/case.ww
Normal file
@@ -0,0 +1,8 @@
|
||||
//ww:run-exit 5
|
||||
package main;
|
||||
export fn main() i32 = {
|
||||
let a: str = "abcde";
|
||||
let b: str = "xy";
|
||||
let t: [2]str = [a, b];
|
||||
return t[0].cap: i32;
|
||||
};
|
||||
8
test/wcc/data/r683_str_cap_direct1/case.ww
Normal file
8
test/wcc/data/r683_str_cap_direct1/case.ww
Normal file
@@ -0,0 +1,8 @@
|
||||
//ww:run-exit 2
|
||||
package main;
|
||||
export fn main() i32 = {
|
||||
let a: str = "abcde";
|
||||
let b: str = "xy";
|
||||
let t: [2]str = [a, b];
|
||||
return t[1].cap: i32;
|
||||
};
|
||||
8
test/wcc/data/r683_str_len1/case.ww
Normal file
8
test/wcc/data/r683_str_len1/case.ww
Normal file
@@ -0,0 +1,8 @@
|
||||
//ww:run-exit 2
|
||||
package main;
|
||||
export fn main() i32 = {
|
||||
let a: str = "abc";
|
||||
let b: str = "de";
|
||||
let t: [2]str = [a, b];
|
||||
return t[1].len: i32;
|
||||
};
|
||||
5
test/wcc/data/r683_str_lit_cap_symmetry/case.ww
Normal file
5
test/wcc/data/r683_str_lit_cap_symmetry/case.ww
Normal file
@@ -0,0 +1,5 @@
|
||||
//ww:compile
|
||||
package main;
|
||||
export fn main() i32 = {
|
||||
return "abc".cap: i32;
|
||||
};
|
||||
7
test/wcc/data/r683_struct_elem/case.ww
Normal file
7
test/wcc/data/r683_struct_elem/case.ww
Normal file
@@ -0,0 +1,7 @@
|
||||
//ww:run-exit 4
|
||||
package main;
|
||||
type Pt = struct { x: i32, y: i32 };
|
||||
export fn main() i32 = {
|
||||
let t: [2]Pt = [Pt { x = 1, y = 2 }, Pt { x = 3, y = 4 }];
|
||||
return t[1].y: i32;
|
||||
};
|
||||
6
test/wcc/data/r684_local_int_elem/case.ww
Normal file
6
test/wcc/data/r684_local_int_elem/case.ww
Normal file
@@ -0,0 +1,6 @@
|
||||
//ww:run-exit 30
|
||||
package main;
|
||||
export fn main() i32 = {
|
||||
let x: [_]int = [10, 20, 30, 40];
|
||||
return x[2]: i32;
|
||||
};
|
||||
6
test/wcc/data/r684_local_one_len/case.ww
Normal file
6
test/wcc/data/r684_local_one_len/case.ww
Normal file
@@ -0,0 +1,6 @@
|
||||
//ww:run-exit 1
|
||||
package main;
|
||||
export fn main() i32 = {
|
||||
let x: [_]int = [7];
|
||||
return x.len: i32;
|
||||
};
|
||||
6
test/wcc/data/r684_local_str_elem/case.ww
Normal file
6
test/wcc/data/r684_local_str_elem/case.ww
Normal file
@@ -0,0 +1,6 @@
|
||||
//ww:run-exit 2
|
||||
package main;
|
||||
export fn main() i32 = {
|
||||
let x: [_]str = ["ab", "cde"];
|
||||
return x[0].len: i32;
|
||||
};
|
||||
6
test/wcc/data/r684_local_str_len/case.ww
Normal file
6
test/wcc/data/r684_local_str_len/case.ww
Normal file
@@ -0,0 +1,6 @@
|
||||
//ww:run-exit 3
|
||||
package main;
|
||||
export fn main() i32 = {
|
||||
let x: [_]str = ["a", "b", "c"];
|
||||
return x.len: i32;
|
||||
};
|
||||
6
test/wcc/data/r684_local_u8_elem/case.ww
Normal file
6
test/wcc/data/r684_local_u8_elem/case.ww
Normal file
@@ -0,0 +1,6 @@
|
||||
//ww:run-exit 5
|
||||
package main;
|
||||
export fn main() i32 = {
|
||||
let x: [_]u8 = [1u8, 2u8, 3u8, 4u8, 5u8];
|
||||
return x[4]: i32;
|
||||
};
|
||||
6
test/wcc/data/r684_local_u8_len/case.ww
Normal file
6
test/wcc/data/r684_local_u8_len/case.ww
Normal file
@@ -0,0 +1,6 @@
|
||||
//ww:run-exit 5
|
||||
package main;
|
||||
export fn main() i32 = {
|
||||
let x: [_]u8 = [1u8, 2u8, 3u8, 4u8, 5u8];
|
||||
return x.len: i32;
|
||||
};
|
||||
6
test/wcc/data/r684_mod_int_elem/case.ww
Normal file
6
test/wcc/data/r684_mod_int_elem/case.ww
Normal file
@@ -0,0 +1,6 @@
|
||||
//ww:run-exit 30
|
||||
package main;
|
||||
let x: [_]int = [10, 20, 30, 40];
|
||||
export fn main() i32 = {
|
||||
return x[2]: i32;
|
||||
};
|
||||
6
test/wcc/data/r684_mod_one_elem/case.ww
Normal file
6
test/wcc/data/r684_mod_one_elem/case.ww
Normal file
@@ -0,0 +1,6 @@
|
||||
//ww:run-exit 7
|
||||
package main;
|
||||
let x: [_]int = [7];
|
||||
export fn main() i32 = {
|
||||
return x[0]: i32;
|
||||
};
|
||||
6
test/wcc/data/r684_mod_one_len/case.ww
Normal file
6
test/wcc/data/r684_mod_one_len/case.ww
Normal file
@@ -0,0 +1,6 @@
|
||||
//ww:run-exit 1
|
||||
package main;
|
||||
let x: [_]int = [7];
|
||||
export fn main() i32 = {
|
||||
return x.len: i32;
|
||||
};
|
||||
6
test/wcc/data/r684_mod_str_len/case.ww
Normal file
6
test/wcc/data/r684_mod_str_len/case.ww
Normal file
@@ -0,0 +1,6 @@
|
||||
//ww:run-exit 3
|
||||
package main;
|
||||
let x: [_]str = ["a", "b", "c"];
|
||||
export fn main() i32 = {
|
||||
return x.len: i32;
|
||||
};
|
||||
6
test/wcc/data/r684_noinit_local_reject/case.ww
Normal file
6
test/wcc/data/r684_noinit_local_reject/case.ww
Normal file
@@ -0,0 +1,6 @@
|
||||
//ww:error "[_]T needs an array-literal initialiser"
|
||||
package main;
|
||||
export fn main() i32 = {
|
||||
let x: [_]str;
|
||||
return 0;
|
||||
};
|
||||
4
test/wcc/data/r684_noinit_mod_reject/case.ww
Normal file
4
test/wcc/data/r684_noinit_mod_reject/case.ww
Normal file
@@ -0,0 +1,4 @@
|
||||
//ww:error "[_]T needs an array-literal initialiser"
|
||||
package main;
|
||||
let x: [_]int;
|
||||
export fn main() i32 = { return 0; };
|
||||
6
test/wcc/data/r684_nonarray_local_reject/case.ww
Normal file
6
test/wcc/data/r684_nonarray_local_reject/case.ww
Normal file
@@ -0,0 +1,6 @@
|
||||
//ww:error "[_]T needs an array-literal initialiser"
|
||||
package main;
|
||||
export fn main() i32 = {
|
||||
let x: [_]int = 5;
|
||||
return 0;
|
||||
};
|
||||
10
test/wcc/data/r685_tagged_bool_variant/case.ww
Normal file
10
test/wcc/data/r685_tagged_bool_variant/case.ww
Normal file
@@ -0,0 +1,10 @@
|
||||
//ww:run-exit 1
|
||||
package main;
|
||||
type cell = (i64 | bool);
|
||||
export fn main() i32 = {
|
||||
let t: [2]cell = [5i64, true];
|
||||
match (t[1]) {
|
||||
case let v: i64 => { return -1; };
|
||||
case let z: bool => { if (z) { return 1; }; return 0; };
|
||||
};
|
||||
};
|
||||
16
test/wcc/data/r685_tagged_boxed_void/case.ww
Normal file
16
test/wcc/data/r685_tagged_boxed_void/case.ww
Normal file
@@ -0,0 +1,16 @@
|
||||
//ww:run-exit 13
|
||||
package main;
|
||||
type ov = (i32 | void);
|
||||
export fn main() i32 = {
|
||||
let t: [3]ov = [1i32, 2i32, void];
|
||||
let sum: i32 = 0;
|
||||
let i: i32 = 0;
|
||||
for (i < 3) {
|
||||
match (t[i]) {
|
||||
case let v: i32 => { sum = sum + v; };
|
||||
case void => { sum = sum + 10; };
|
||||
};
|
||||
i = i + 1;
|
||||
};
|
||||
return sum;
|
||||
};
|
||||
10
test/wcc/data/r685_tagged_lit_first/case.ww
Normal file
10
test/wcc/data/r685_tagged_lit_first/case.ww
Normal file
@@ -0,0 +1,10 @@
|
||||
//ww:run-exit 99
|
||||
package main;
|
||||
type cell = (i64 | bool);
|
||||
export fn main() i32 = {
|
||||
let t: [2]cell = [99i64, 7i64];
|
||||
match (t[0]) {
|
||||
case let v: i64 => { return v: i32; };
|
||||
case let z: bool => { return -1; };
|
||||
};
|
||||
};
|
||||
10
test/wcc/data/r685_tagged_lit_second/case.ww
Normal file
10
test/wcc/data/r685_tagged_lit_second/case.ww
Normal file
@@ -0,0 +1,10 @@
|
||||
//ww:run-exit 7
|
||||
package main;
|
||||
type cell = (i64 | bool);
|
||||
export fn main() i32 = {
|
||||
let t: [2]cell = [99i64, 7i64];
|
||||
match (t[1]) {
|
||||
case let v: i64 => { return v: i32; };
|
||||
case let z: bool => { return -1; };
|
||||
};
|
||||
};
|
||||
16
test/wcc/data/r685_tagged_lit_sum106/case.ww
Normal file
16
test/wcc/data/r685_tagged_lit_sum106/case.ww
Normal file
@@ -0,0 +1,16 @@
|
||||
//ww:run-exit 106
|
||||
package main;
|
||||
type cell = (i64 | bool);
|
||||
export fn main() i32 = {
|
||||
let t: [2]cell = [99i64, 7i64];
|
||||
let sum: i64 = 0i64;
|
||||
let i: i32 = 0;
|
||||
for (i < 2) {
|
||||
match (t[i]) {
|
||||
case let v: i64 => { sum = sum + v; };
|
||||
case let z: bool => { sum = sum + 1i64; };
|
||||
};
|
||||
i = i + 1;
|
||||
};
|
||||
return sum: i32;
|
||||
};
|
||||
7
test/wcc/data/r685_tagged_repeat_reject/case.ww
Normal file
7
test/wcc/data/r685_tagged_repeat_reject/case.ww
Normal file
@@ -0,0 +1,7 @@
|
||||
//ww:error "repeat of a tagged-union array-literal element not wired"
|
||||
package main;
|
||||
type cell = (i64 | bool);
|
||||
export fn main() i32 = {
|
||||
let t: [3]cell = [99i64...];
|
||||
return 0;
|
||||
};
|
||||
10
test/wcc/data/r685_tagged_stride3/case.ww
Normal file
10
test/wcc/data/r685_tagged_stride3/case.ww
Normal file
@@ -0,0 +1,10 @@
|
||||
//ww:run-exit 30
|
||||
package main;
|
||||
type cell = (i64 | bool);
|
||||
export fn main() i32 = {
|
||||
let t: [3]cell = [10i64, 20i64, 30i64];
|
||||
match (t[2]) {
|
||||
case let v: i64 => { return v: i32; };
|
||||
case let z: bool => { return -1; };
|
||||
};
|
||||
};
|
||||
18
test/wcc/data/r685_tagged_var_sum/case.ww
Normal file
18
test/wcc/data/r685_tagged_var_sum/case.ww
Normal file
@@ -0,0 +1,18 @@
|
||||
//ww:run-exit 42
|
||||
package main;
|
||||
type cell = (i64 | bool);
|
||||
export fn main() i32 = {
|
||||
let a: cell = 40i64;
|
||||
let b: cell = 2i64;
|
||||
let t: [2]cell = [a, b];
|
||||
let sum: i64 = 0i64;
|
||||
let i: i32 = 0;
|
||||
for (i < 2) {
|
||||
match (t[i]) {
|
||||
case let v: i64 => { sum = sum + v; };
|
||||
case let z: bool => { sum = sum + 100i64; };
|
||||
};
|
||||
i = i + 1;
|
||||
};
|
||||
return sum: i32;
|
||||
};
|
||||
4
test/wcc/data/r686_slice_glob_cap/case.ww
Normal file
4
test/wcc/data/r686_slice_glob_cap/case.ww
Normal file
@@ -0,0 +1,4 @@
|
||||
//ww:run
|
||||
package main;
|
||||
let g: []u8;
|
||||
export fn main() i32 = { return g.cap: i32; };
|
||||
4
test/wcc/data/r686_slice_glob_len/case.ww
Normal file
4
test/wcc/data/r686_slice_glob_len/case.ww
Normal file
@@ -0,0 +1,4 @@
|
||||
//ww:run
|
||||
package main;
|
||||
let g: []u8;
|
||||
export fn main() i32 = { return g.len: i32; };
|
||||
7
test/wcc/data/r686_slice_glob_ptr_null/case.ww
Normal file
7
test/wcc/data/r686_slice_glob_ptr_null/case.ww
Normal file
@@ -0,0 +1,7 @@
|
||||
//ww:run-exit 7
|
||||
package main;
|
||||
let g: []u8;
|
||||
export fn main() i32 = {
|
||||
if (g.ptr == nil) { return 7; };
|
||||
return 0;
|
||||
};
|
||||
4
test/wcc/data/r686_str_glob_len/case.ww
Normal file
4
test/wcc/data/r686_str_glob_len/case.ww
Normal file
@@ -0,0 +1,4 @@
|
||||
//ww:run
|
||||
package main;
|
||||
let s: str;
|
||||
export fn main() i32 = { return s.len: i32; };
|
||||
7
test/wcc/data/r686_str_glob_ptr_null/case.ww
Normal file
7
test/wcc/data/r686_str_glob_ptr_null/case.ww
Normal file
@@ -0,0 +1,7 @@
|
||||
//ww:run-exit 9
|
||||
package main;
|
||||
let s: str;
|
||||
export fn main() i32 = {
|
||||
if (s.ptr == nil) { return 9; };
|
||||
return 0;
|
||||
};
|
||||
5
test/wcc/data/r687_alias_slice/case.ww
Normal file
5
test/wcc/data/r687_alias_slice/case.ww
Normal file
@@ -0,0 +1,5 @@
|
||||
//ww:run-exit 7
|
||||
package main;
|
||||
type S = []u8;
|
||||
let g: S = [1u8, 2u8, 3u8];
|
||||
export fn main() i32 = { return (g[0]:i32)+(g.len:i32)+(g.cap:i32); };
|
||||
4
test/wcc/data/r687_i32_sum/case.ww
Normal file
4
test/wcc/data/r687_i32_sum/case.ww
Normal file
@@ -0,0 +1,4 @@
|
||||
//ww:run-exit 24
|
||||
package main;
|
||||
let g: []i32 = [7i32, 8i32, 9i32];
|
||||
export fn main() i32 = { return (g[0]:i32)+(g[1]:i32)+(g[2]:i32); };
|
||||
4
test/wcc/data/r687_i64_e1/case.ww
Normal file
4
test/wcc/data/r687_i64_e1/case.ww
Normal file
@@ -0,0 +1,4 @@
|
||||
//ww:run-exit 20
|
||||
package main;
|
||||
let g: []i64 = [10i64, 20i64, 30i64];
|
||||
export fn main() i32 = { return g[1]: i32; };
|
||||
4
test/wcc/data/r687_i64_lencap/case.ww
Normal file
4
test/wcc/data/r687_i64_lencap/case.ww
Normal file
@@ -0,0 +1,4 @@
|
||||
//ww:run-exit 6
|
||||
package main;
|
||||
let g: []i64 = [10i64, 20i64, 30i64];
|
||||
export fn main() i32 = { return (g.len:i32)+(g.cap:i32); };
|
||||
4
test/wcc/data/r687_neg_def_slicelit/case.ww
Normal file
4
test/wcc/data/r687_neg_def_slicelit/case.ww
Normal file
@@ -0,0 +1,4 @@
|
||||
//ww:error "module-level slice-literal init needs a writable `let`"
|
||||
package main;
|
||||
def g: []u8 = [1u8, 2u8, 3u8];
|
||||
export fn main() i32 = { return g.len: i32; };
|
||||
4
test/wcc/data/r687_neg_repeat_slicelit/case.ww
Normal file
4
test/wcc/data/r687_neg_repeat_slicelit/case.ww
Normal file
@@ -0,0 +1,4 @@
|
||||
//ww:error "'...' repeat has no target length in a slice literal"
|
||||
package main;
|
||||
let g: []u8 = [1u8, 2u8...];
|
||||
export fn main() i32 = { return g.len: i32; };
|
||||
4
test/wcc/data/r687_neg_str_slicelit/case.ww
Normal file
4
test/wcc/data/r687_neg_str_slicelit/case.ww
Normal file
@@ -0,0 +1,4 @@
|
||||
//ww:error "slice-of-{str,slice,tagged} literal static-init unsupported"
|
||||
package main;
|
||||
let g: []str = ["a", "b"];
|
||||
export fn main() i32 = { return g.len: i32; };
|
||||
4
test/wcc/data/r687_one_edge/case.ww
Normal file
4
test/wcc/data/r687_one_edge/case.ww
Normal file
@@ -0,0 +1,4 @@
|
||||
//ww:run-exit 43
|
||||
package main;
|
||||
let g: []u8 = [42u8];
|
||||
export fn main() i32 = { return (g[0]:i32)+(g.len:i32); };
|
||||
7
test/wcc/data/r687_struct_3f/case.ww
Normal file
7
test/wcc/data/r687_struct_3f/case.ww
Normal file
@@ -0,0 +1,7 @@
|
||||
//ww:run-exit 23
|
||||
package main;
|
||||
type q = struct { a: u8, b: i64, c: i32 };
|
||||
let g: []q = [q{a=1u8, b=2i64, c=3i32}, q{a=4u8, b=5i64, c=6i32}];
|
||||
export fn main() i32 = {
|
||||
return (g[0].a:i32)+(g[0].b:i32)+(g[0].c:i32)+(g[1].a:i32)+(g[1].b:i32)+(g[1].c:i32)+(g.len:i32);
|
||||
};
|
||||
8
test/wcc/data/r687_struct_arrvar_local/case.ww
Normal file
8
test/wcc/data/r687_struct_arrvar_local/case.ww
Normal file
@@ -0,0 +1,8 @@
|
||||
//ww:run-exit 14
|
||||
package main;
|
||||
type pt = struct { a: i64, b: i64 };
|
||||
export fn main() i32 = {
|
||||
let arr: [2]pt = [pt{a=1i64, b=2i64}, pt{a=3i64, b=4i64}];
|
||||
let g: []pt = arr;
|
||||
return (g[0].a:i32)+(g[0].b:i32)+(g[1].a:i32)+(g[1].b:i32)+(g.len:i32)+(g.cap:i32);
|
||||
};
|
||||
7
test/wcc/data/r687_struct_one/case.ww
Normal file
7
test/wcc/data/r687_struct_one/case.ww
Normal file
@@ -0,0 +1,7 @@
|
||||
//ww:run-exit 13
|
||||
package main;
|
||||
type pt = struct { a: i64, b: i64 };
|
||||
let g: []pt = [pt{a=5i64, b=6i64}];
|
||||
export fn main() i32 = {
|
||||
return (g[0].a:i32)+(g[0].b:i32)+(g.len:i32)+(g.cap:i32);
|
||||
};
|
||||
7
test/wcc/data/r687_struct_pt/case.ww
Normal file
7
test/wcc/data/r687_struct_pt/case.ww
Normal file
@@ -0,0 +1,7 @@
|
||||
//ww:run-exit 14
|
||||
package main;
|
||||
type pt = struct { a: i64, b: i64 };
|
||||
let g: []pt = [pt{a=1i64, b=2i64}, pt{a=3i64, b=4i64}];
|
||||
export fn main() i32 = {
|
||||
return (g[0].a:i32)+(g[0].b:i32)+(g[1].a:i32)+(g[1].b:i32)+(g.len:i32)+(g.cap:i32);
|
||||
};
|
||||
4
test/wcc/data/r687_u8_cap/case.ww
Normal file
4
test/wcc/data/r687_u8_cap/case.ww
Normal file
@@ -0,0 +1,4 @@
|
||||
//ww:run-exit 3
|
||||
package main;
|
||||
let g: []u8 = [1u8, 2u8, 3u8];
|
||||
export fn main() i32 = { return g.cap: i32; };
|
||||
4
test/wcc/data/r687_u8_e0/case.ww
Normal file
4
test/wcc/data/r687_u8_e0/case.ww
Normal file
@@ -0,0 +1,4 @@
|
||||
//ww:run-exit 1
|
||||
package main;
|
||||
let g: []u8 = [1u8, 2u8, 3u8];
|
||||
export fn main() i32 = { return g[0]: i32; };
|
||||
4
test/wcc/data/r687_u8_e2/case.ww
Normal file
4
test/wcc/data/r687_u8_e2/case.ww
Normal file
@@ -0,0 +1,4 @@
|
||||
//ww:run-exit 3
|
||||
package main;
|
||||
let g: []u8 = [1u8, 2u8, 3u8];
|
||||
export fn main() i32 = { return g[2]: i32; };
|
||||
4
test/wcc/data/r687_u8_len/case.ww
Normal file
4
test/wcc/data/r687_u8_len/case.ww
Normal file
@@ -0,0 +1,4 @@
|
||||
//ww:run-exit 3
|
||||
package main;
|
||||
let g: []u8 = [1u8, 2u8, 3u8];
|
||||
export fn main() i32 = { return g.len: i32; };
|
||||
6
test/wcc/data/r687_u8_sum/case.ww
Normal file
6
test/wcc/data/r687_u8_sum/case.ww
Normal file
@@ -0,0 +1,6 @@
|
||||
//ww:run-exit 12
|
||||
package main;
|
||||
let g: []u8 = [1u8, 2u8, 3u8];
|
||||
export fn main() i32 = {
|
||||
return (g[0]:i32)+(g[1]:i32)+(g[2]:i32)+(g.len:i32)+(g.cap:i32);
|
||||
};
|
||||
5
test/wcc/data/r688_arr_a0/case.ww
Normal file
5
test/wcc/data/r688_arr_a0/case.ww
Normal file
@@ -0,0 +1,5 @@
|
||||
//ww:run-exit 1
|
||||
package main;
|
||||
type pt = struct { a: i64, b: i64 };
|
||||
let g: [2]pt = [pt { a = 1, b = 2 }, pt { a = 3, b = 4 }];
|
||||
export fn main() i32 = { return g[0].a: i32; };
|
||||
5
test/wcc/data/r688_arr_a1/case.ww
Normal file
5
test/wcc/data/r688_arr_a1/case.ww
Normal file
@@ -0,0 +1,5 @@
|
||||
//ww:run-exit 3
|
||||
package main;
|
||||
type pt = struct { a: i64, b: i64 };
|
||||
let g: [2]pt = [pt { a = 1, b = 2 }, pt { a = 3, b = 4 }];
|
||||
export fn main() i32 = { return g[1].a: i32; };
|
||||
5
test/wcc/data/r688_arr_b0/case.ww
Normal file
5
test/wcc/data/r688_arr_b0/case.ww
Normal file
@@ -0,0 +1,5 @@
|
||||
//ww:run-exit 2
|
||||
package main;
|
||||
type pt = struct { a: i64, b: i64 };
|
||||
let g: [2]pt = [pt { a = 1, b = 2 }, pt { a = 3, b = 4 }];
|
||||
export fn main() i32 = { return g[0].b: i32; };
|
||||
5
test/wcc/data/r688_arr_b1/case.ww
Normal file
5
test/wcc/data/r688_arr_b1/case.ww
Normal file
@@ -0,0 +1,5 @@
|
||||
//ww:run-exit 4
|
||||
package main;
|
||||
type pt = struct { a: i64, b: i64 };
|
||||
let g: [2]pt = [pt { a = 1, b = 2 }, pt { a = 3, b = 4 }];
|
||||
export fn main() i32 = { return g[1].b: i32; };
|
||||
5
test/wcc/data/r688_rec_tag1/case.ww
Normal file
5
test/wcc/data/r688_rec_tag1/case.ww
Normal file
@@ -0,0 +1,5 @@
|
||||
//ww:run-exit 2
|
||||
package main;
|
||||
type rec = struct { tag: u8, x: i32, y: i64 };
|
||||
let g: [2]rec = [rec { tag = 1u8, x = 100, y = 11 }, rec { tag = 2u8, x = 200, y = 22 }];
|
||||
export fn main() i32 = { return g[1].tag: i32; };
|
||||
5
test/wcc/data/r688_rec_x1/case.ww
Normal file
5
test/wcc/data/r688_rec_x1/case.ww
Normal file
@@ -0,0 +1,5 @@
|
||||
//ww:run-exit 200
|
||||
package main;
|
||||
type rec = struct { tag: u8, x: i32, y: i64 };
|
||||
let g: [2]rec = [rec { tag = 1u8, x = 100, y = 11 }, rec { tag = 2u8, x = 200, y = 22 }];
|
||||
export fn main() i32 = { return g[1].x: i32; };
|
||||
5
test/wcc/data/r688_rec_y1/case.ww
Normal file
5
test/wcc/data/r688_rec_y1/case.ww
Normal file
@@ -0,0 +1,5 @@
|
||||
//ww:run-exit 22
|
||||
package main;
|
||||
type rec = struct { tag: u8, x: i32, y: i64 };
|
||||
let g: [2]rec = [rec { tag = 1u8, x = 100, y = 11 }, rec { tag = 2u8, x = 200, y = 22 }];
|
||||
export fn main() i32 = { return g[1].y: i32; };
|
||||
6
test/wcc/data/r688_slice_x1_byteid/case.ww
Normal file
6
test/wcc/data/r688_slice_x1_byteid/case.ww
Normal file
@@ -0,0 +1,6 @@
|
||||
//ww:compile
|
||||
package main;
|
||||
type rec = struct { tag: u8, x: i32, y: i64 };
|
||||
let arr: [2]rec = [rec { tag = 1u8, x = 100, y = 11 }, rec { tag = 2u8, x = 200, y = 22 }];
|
||||
let g: []rec = arr;
|
||||
export fn main() i32 = { return g[1].x: i32; };
|
||||
6
test/wcc/data/r689_gpr_chain_i64_sink/case.ww
Normal file
6
test/wcc/data/r689_gpr_chain_i64_sink/case.ww
Normal file
@@ -0,0 +1,6 @@
|
||||
//ww:run-exit 1
|
||||
package main;
|
||||
type T = struct { q: i64 };
|
||||
type S = struct { x: T };
|
||||
let gp: *S = nil;
|
||||
export fn main() i32 = { let s: S = S{x=T{q=0}}; gp = &s; s.x.q = 4294967297; let v: i64 = gp.x.q; return (v >> 32): i32; };
|
||||
5
test/wcc/data/r689_gpr_chain_str_len/case.ww
Normal file
5
test/wcc/data/r689_gpr_chain_str_len/case.ww
Normal file
@@ -0,0 +1,5 @@
|
||||
//ww:run-exit 3
|
||||
package main;
|
||||
type S = struct { a: i64, sf: str };
|
||||
let gp: *S = nil;
|
||||
export fn main() i32 = { let s: S = S{a=0,sf="abc"}; gp = &s; return gp.sf.len: i32; };
|
||||
6
test/wcc/data/r689_gpr_chain_struct_field/case.ww
Normal file
6
test/wcc/data/r689_gpr_chain_struct_field/case.ww
Normal file
@@ -0,0 +1,6 @@
|
||||
//ww:run-exit 7
|
||||
package main;
|
||||
type Inner = struct { p: i64, q: i64 };
|
||||
type S = struct { a: i64, x: Inner };
|
||||
let gp: *S = nil;
|
||||
export fn main() i32 = { let s: S = S{a=0,x=Inner{p=0,q=0}}; gp = &s; s.x.q = 7; return gp.x.q: i32; };
|
||||
5
test/wcc/data/r689_gpr_float_field/case.ww
Normal file
5
test/wcc/data/r689_gpr_float_field/case.ww
Normal file
@@ -0,0 +1,5 @@
|
||||
//ww:run-exit 7
|
||||
package main;
|
||||
type S = struct { a: i64, d: f64 };
|
||||
let gp: *S = nil;
|
||||
export fn main() i32 = { let s: S = S{a=0,d=0.0}; gp = &s; s.d = 7.0; return (gp.d): i32; };
|
||||
4
test/wcc/data/r689_gpr_local_ptr_ctrl/case.ww
Normal file
4
test/wcc/data/r689_gpr_local_ptr_ctrl/case.ww
Normal file
@@ -0,0 +1,4 @@
|
||||
//ww:run-exit 42
|
||||
package main;
|
||||
type S = struct { a: i64, f: i64 };
|
||||
export fn main() i32 = { let s: S = S{a=0,f=0}; let lp: *S = &s; s.f = 42; return lp.f: i32; };
|
||||
5
test/wcc/data/r689_gpr_param_ctrl/case.ww
Normal file
5
test/wcc/data/r689_gpr_param_ctrl/case.ww
Normal file
@@ -0,0 +1,5 @@
|
||||
//ww:run-exit 10
|
||||
package main;
|
||||
type S = struct { f: i64, g: i64 };
|
||||
fn rd(p: *S) i32 = { return (p.f + p.g): i32; };
|
||||
export fn main() i32 = { let s: S = S{f=4,g=6}; return rd(&s); };
|
||||
4
test/wcc/data/r689_gpr_pslice_len/case.ww
Normal file
4
test/wcc/data/r689_gpr_pslice_len/case.ww
Normal file
@@ -0,0 +1,4 @@
|
||||
//ww:run-exit 3
|
||||
package main;
|
||||
let gp: *[]u8 = nil;
|
||||
export fn main() i32 = { let b: []u8 = [1u8,2u8,3u8]; gp = &b; return (gp.len): i32; };
|
||||
5
test/wcc/data/r689_gpr_scalar_off0_off8/case.ww
Normal file
5
test/wcc/data/r689_gpr_scalar_off0_off8/case.ww
Normal file
@@ -0,0 +1,5 @@
|
||||
//ww:run-exit 14
|
||||
package main;
|
||||
type S = struct { f: i64, g: i64 };
|
||||
let gp: *S = nil;
|
||||
export fn main() i32 = { let s: S = S{f=0,g=0}; gp = &s; s.f = 5; s.g = 9; return (gp.f + gp.g): i32; };
|
||||
5
test/wcc/data/r689_gpr_scalar_off8/case.ww
Normal file
5
test/wcc/data/r689_gpr_scalar_off8/case.ww
Normal file
@@ -0,0 +1,5 @@
|
||||
//ww:run-exit 170
|
||||
package main;
|
||||
type S = struct { a: i64, f: i64 };
|
||||
let gp: *S = nil;
|
||||
export fn main() i32 = { let s: S = S{a=0,f=0}; gp = &s; s.f = 170; return gp.f: i32; };
|
||||
5
test/wcc/data/r689_gpr_str_field/case.ww
Normal file
5
test/wcc/data/r689_gpr_str_field/case.ww
Normal file
@@ -0,0 +1,5 @@
|
||||
//ww:run-exit 3
|
||||
package main;
|
||||
type S = struct { a: i64, sf: str };
|
||||
let gp: *S = nil;
|
||||
export fn main() i32 = { let s: S = S{a=0,sf="abc"}; gp = &s; let x: str = gp.sf; return x.len: i32; };
|
||||
5
test/wcc/data/r689_gpr_tagged_field/case.ww
Normal file
5
test/wcc/data/r689_gpr_tagged_field/case.ww
Normal file
@@ -0,0 +1,5 @@
|
||||
//ww:run-exit 5
|
||||
package main;
|
||||
type S = struct { a: i64, t: (i64 | i32) };
|
||||
let gp: *S = nil;
|
||||
export fn main() i32 = { let s: S = S{a=0,t=5i32}; gp = &s; let v: i32 = 0; match (gp.t) { case let x: i32 => v = x; case let y: i64 => v = y: i32; }; return v; };
|
||||
5
test/wcc/data/r689_gpr_tagged_slice_field/case.ww
Normal file
5
test/wcc/data/r689_gpr_tagged_slice_field/case.ww
Normal file
@@ -0,0 +1,5 @@
|
||||
//ww:run-exit 3
|
||||
package main;
|
||||
type S = struct { a: i64, t: (i64 | []u8) };
|
||||
let gp: *S = nil;
|
||||
export fn main() i32 = { let s: S = S{a=0,t=3i64}; gp = &s; let v: i32 = 0; match (gp.t) { case let x: i64 => v = x: i32; case let y: []u8 => v = len(y): i32; }; return v; };
|
||||
4
test/wcc/data/r689_gpr_tagged_slice_field_local/case.ww
Normal file
4
test/wcc/data/r689_gpr_tagged_slice_field_local/case.ww
Normal file
@@ -0,0 +1,4 @@
|
||||
//ww:run-exit 3
|
||||
package main;
|
||||
type S = struct { a: i64, t: (i64 | []u8) };
|
||||
export fn main() i32 = { let s: S = S{a=0,t=3i64}; let p: *S = &s; let v: i32 = 0; match (p.t) { case let x: i64 => v = x: i32; case let y: []u8 => v = len(y): i32; }; return v; };
|
||||
6
test/wcc/data/r689_gps_chained/case.ww
Normal file
6
test/wcc/data/r689_gps_chained/case.ww
Normal file
@@ -0,0 +1,6 @@
|
||||
//ww:run-exit 18
|
||||
package main;
|
||||
type I = struct { y: i64, z: i64 };
|
||||
type S = struct { a: i64, x: I };
|
||||
let gp: *S = nil;
|
||||
export fn main() i32 = { let s: S = S{a=0,x=I{y=0,z=0}}; gp = &s; gp.x.y = 11; gp.x.z += 7; return (s.x.y+s.x.z): i32; };
|
||||
5
test/wcc/data/r689_gps_compound_off0/case.ww
Normal file
5
test/wcc/data/r689_gps_compound_off0/case.ww
Normal file
@@ -0,0 +1,5 @@
|
||||
//ww:run-exit 7
|
||||
package main;
|
||||
type S = struct { f: i64, g: i64 };
|
||||
let gp: *S = nil;
|
||||
export fn main() i32 = { let s: S = S{f=0,g=0}; gp = &s; gp.f += 7; return s.f: i32; };
|
||||
5
test/wcc/data/r689_gps_compound_off8/case.ww
Normal file
5
test/wcc/data/r689_gps_compound_off8/case.ww
Normal file
@@ -0,0 +1,5 @@
|
||||
//ww:run-exit 5
|
||||
package main;
|
||||
type S = struct { a: i64, f: i64 };
|
||||
let gp: *S = nil;
|
||||
export fn main() i32 = { let s: S = S{a=0,f=0}; gp = &s; gp.f += 5; return s.f: i32; };
|
||||
6
test/wcc/data/r689_gps_indexed/case.ww
Normal file
6
test/wcc/data/r689_gps_indexed/case.ww
Normal file
@@ -0,0 +1,6 @@
|
||||
//ww:run-exit 13
|
||||
package main;
|
||||
type E = struct { f: i64, g: i64 };
|
||||
type S = struct { n: i64, a: [3]E };
|
||||
let gp: *S = nil;
|
||||
export fn main() i32 = { let s: S; gp = &s; gp.a[1].f = 5; gp.a[1].g += 8; return (s.a[1].f+s.a[1].g): i32; };
|
||||
4
test/wcc/data/r689_gps_local_ptr_ctrl/case.ww
Normal file
4
test/wcc/data/r689_gps_local_ptr_ctrl/case.ww
Normal file
@@ -0,0 +1,4 @@
|
||||
//ww:run-exit 5
|
||||
package main;
|
||||
type S = struct { a: i64, f: i64 };
|
||||
export fn main() i32 = { let s: S = S{a=0,f=0}; let lp: *S = &s; lp.f += 5; return s.f: i32; };
|
||||
5
test/wcc/data/r689_gps_param_off0_ctrl/case.ww
Normal file
5
test/wcc/data/r689_gps_param_off0_ctrl/case.ww
Normal file
@@ -0,0 +1,5 @@
|
||||
//ww:run-exit 10
|
||||
package main;
|
||||
type S = struct { f: i64, g: i64 };
|
||||
fn bump(p: *S) void = { p.f += 3; p.g += 4; };
|
||||
export fn main() i32 = { let s: S = S{f=1,g=2}; bump(&s); return (s.f+s.g): i32; };
|
||||
5
test/wcc/data/r689_gps_str_field/case.ww
Normal file
5
test/wcc/data/r689_gps_str_field/case.ww
Normal file
@@ -0,0 +1,5 @@
|
||||
//ww:run-exit 2
|
||||
package main;
|
||||
type S = struct { a: i64, sf: str };
|
||||
let gp: *S = nil;
|
||||
export fn main() i32 = { let s: S = S{a=0,sf=""}; gp = &s; gp.sf = "hi"; return (s.sf.len): i32; };
|
||||
6
test/wcc/data/r689_gps_struct_field/case.ww
Normal file
6
test/wcc/data/r689_gps_struct_field/case.ww
Normal file
@@ -0,0 +1,6 @@
|
||||
//ww:run-exit 16
|
||||
package main;
|
||||
type I = struct { x: i64, y: i64 };
|
||||
type S = struct { a: i64, in: I };
|
||||
let gp: *S = nil;
|
||||
export fn main() i32 = { let s: S = S{a=0,in=I{x=0,y=0}}; gp = &s; gp.in = I{x=7,y=9}; return (s.in.x+s.in.y): i32; };
|
||||
9
test/wcc/data/r689_slf_off_cap/case.ww
Normal file
9
test/wcc/data/r689_slf_off_cap/case.ww
Normal file
@@ -0,0 +1,9 @@
|
||||
//ww:run-exit 8
|
||||
package main;
|
||||
type hs = struct { head: i64, s: []u8 };
|
||||
export fn main() i32 = {
|
||||
let hb: [8]u8;
|
||||
let b: []u8; b.ptr = &hb[0]; b.len = 7; b.cap = 8;
|
||||
let y: hs = hs { head = 1i64, s = b };
|
||||
return y.s.cap: i32;
|
||||
};
|
||||
9
test/wcc/data/r689_slf_off_head/case.ww
Normal file
9
test/wcc/data/r689_slf_off_head/case.ww
Normal file
@@ -0,0 +1,9 @@
|
||||
//ww:run-exit 1
|
||||
package main;
|
||||
type hs = struct { head: i64, s: []u8 };
|
||||
export fn main() i32 = {
|
||||
let hb: [8]u8;
|
||||
let b: []u8; b.ptr = &hb[0]; b.len = 7; b.cap = 8;
|
||||
let y: hs = hs { head = 1i64, s = b };
|
||||
return y.head: i32;
|
||||
};
|
||||
9
test/wcc/data/r689_slf_off_len/case.ww
Normal file
9
test/wcc/data/r689_slf_off_len/case.ww
Normal file
@@ -0,0 +1,9 @@
|
||||
//ww:run-exit 7
|
||||
package main;
|
||||
type hs = struct { head: i64, s: []u8 };
|
||||
export fn main() i32 = {
|
||||
let hb: [8]u8;
|
||||
let b: []u8; b.ptr = &hb[0]; b.len = 7; b.cap = 8;
|
||||
let y: hs = hs { head = 1i64, s = b };
|
||||
return y.s.len: i32;
|
||||
};
|
||||
9
test/wcc/data/r689_slf_slice_cap/case.ww
Normal file
9
test/wcc/data/r689_slf_slice_cap/case.ww
Normal file
@@ -0,0 +1,9 @@
|
||||
//ww:run-exit 8
|
||||
package main;
|
||||
type cl = struct { items: []u8, n: i64 };
|
||||
export fn main() i32 = {
|
||||
let hb: [8]u8;
|
||||
let b: []u8; b.ptr = &hb[0]; b.len = 5; b.cap = 8;
|
||||
let y: cl = cl { items = b, n = 9i64 };
|
||||
return y.items.cap: i32;
|
||||
};
|
||||
9
test/wcc/data/r689_slf_slice_len/case.ww
Normal file
9
test/wcc/data/r689_slf_slice_len/case.ww
Normal file
@@ -0,0 +1,9 @@
|
||||
//ww:run-exit 5
|
||||
package main;
|
||||
type cl = struct { items: []u8, n: i64 };
|
||||
export fn main() i32 = {
|
||||
let hb: [8]u8;
|
||||
let b: []u8; b.ptr = &hb[0]; b.len = 5; b.cap = 8;
|
||||
let y: cl = cl { items = b, n = 9i64 };
|
||||
return y.items.len: i32;
|
||||
};
|
||||
9
test/wcc/data/r689_slf_slice_n/case.ww
Normal file
9
test/wcc/data/r689_slf_slice_n/case.ww
Normal file
@@ -0,0 +1,9 @@
|
||||
//ww:run-exit 9
|
||||
package main;
|
||||
type cl = struct { items: []u8, n: i64 };
|
||||
export fn main() i32 = {
|
||||
let hb: [8]u8;
|
||||
let b: []u8; b.ptr = &hb[0]; b.len = 5; b.cap = 8;
|
||||
let y: cl = cl { items = b, n = 9i64 };
|
||||
return y.n: i32;
|
||||
};
|
||||
9
test/wcc/data/r689_slf_slice_ptr/case.ww
Normal file
9
test/wcc/data/r689_slf_slice_ptr/case.ww
Normal file
@@ -0,0 +1,9 @@
|
||||
//ww:run-exit 4
|
||||
package main;
|
||||
type cl = struct { items: []u8, n: i64 };
|
||||
export fn main() i32 = {
|
||||
let hb: [8]u8; hb[0] = 4u8;
|
||||
let b: []u8; b.ptr = &hb[0]; b.len = 5; b.cap = 8;
|
||||
let y: cl = cl { items = b, n = 9i64 };
|
||||
return y.items[0]: i32;
|
||||
};
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user