Files
vercel-labs--zerolang/conformance/native/pass/std-mem-field-items.0
T
wehub-resource-sync e7738de6d2
CI / Deep Native Runtime Cases (1/6) (push) Has been skipped
CI / Native Preflight (push) Failing after 1s
CI / Native Runtime Cases (1/2) (push) Failing after 0s
CI / Native Runtime Cases (2/2) (push) Failing after 1s
CI / Native Metadata Reports (push) Failing after 0s
CI / Native Direct Backend Artifacts (push) Failing after 0s
CI / Native Sanitizer Smoke (push) Failing after 1s
CI / Command Contract Snapshots (push) Failing after 1s
CI / Deep Conformance Suite (push) Has been skipped
CI / Graph Build Perf (push) Failing after 1s
CI / Deep Native Preflight (push) Has been skipped
CI / Deep Native Runtime Cases (2/6) (push) Has been skipped
CI / Deep Native Runtime Cases (3/6) (push) Has been skipped
CI / Conformance Suite (push) Failing after 1s
CI / Workspace Checks (push) Failing after 0s
CI / Deep Native Runtime Cases (5/6) (push) Has been skipped
CI / Deep Native Runtime Cases (6/6) (push) Has been skipped
CI / Deep Native Runtime Cases (4/6) (push) Has been skipped
CI / Deep Graph Build Perf (push) Has been skipped
chore: import upstream snapshot with attribution
2026-07-13 12:29:30 +08:00

19 lines
943 B
Plaintext

type Holder {
tag: i32,
values: [4]i32,
scratch: [4]i32,
}
pub fn main(world: World) -> Void raises {
var holder: Holder = Holder { tag: 77, values: [1, 2, 3, 4], scratch: [0, 0, 0, 0] }
let filled: usize = std.mem.fillItems(holder.values[1..], 9)
let copied: usize = std.mem.copyItems(holder.scratch, holder.values)
let prefix: Span<i32> = std.mem.prefix(holder.scratch, 3)
let tail: Span<i32> = std.mem.dropPrefix(holder.values, 2)
let fieldItemsOk: Bool = filled == 3 && copied == 4 && holder.tag == 77 && holder.values[0] == 1 && holder.values[1] == 9 && holder.values[3] == 9 && holder.scratch[0] == 1 && holder.scratch[1] == 9 && holder.scratch[3] == 9
let fieldSpansOk: Bool = std.mem.len(prefix) == 3 && std.mem.contains(prefix, 9) && std.mem.len(tail) == 2 && tail[0] == 9 && tail[1] == 9
if fieldItemsOk && fieldSpansOk {
check world.out.write("std mem field items ok\n")
}
}