Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions src/test.zig
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
const std = @import("std");
const libcoro = @import("libcoro");

fn coroFnImpl(x: *usize) usize {
const BigStruct = struct {
a: u128,
b: u128,
c: u128,
};

fn coroFnImpl(x: *usize, _: *anyopaque, _: *anyopaque, _: *anyopaque, _: BigStruct) usize {
x.* += 1;
libcoro.xsuspend();
x.* += 3;
Expand All @@ -16,7 +22,7 @@ test "with FrameT and xasync xawait" {

var x: usize = 0;

var frame = try libcoro.xasync(coroFnImpl, .{&x}, stack);
var frame = try libcoro.xasync(coroFnImpl, .{ &x, null, null, null, undefined }, stack);

try std.testing.expectEqual(x, 1);
libcoro.xresume(frame);
Expand Down