zig/test/behavior/bugs/624.zig
Andrew Kelley 4307436b99 move behavior tests from test/stage1/ to test/
And fix test cases to make them pass. This is in preparation for
starting to pass behavior tests with self-hosted.
2021-04-29 15:54:04 -07:00

24 lines
443 B
Zig

const std = @import("std");
const expect = std.testing.expect;
const TestContext = struct {
server_context: *ListenerContext,
};
const ListenerContext = struct {
context_alloc: *ContextAllocator,
};
const ContextAllocator = MemoryPool(TestContext);
fn MemoryPool(comptime T: type) type {
return struct {
n: usize,
};
}
test "foo" {
var allocator = ContextAllocator{ .n = 10 };
expect(allocator.n == 10);
}