File tree 2 files changed +24
-0
lines changed
2 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ comptime {
32
32
_ = @import ("behavior/bugs/394.zig" );
33
33
_ = @import ("behavior/bugs/421.zig" );
34
34
_ = @import ("behavior/bugs/529.zig" );
35
+ _ = @import ("behavior/bugs/624.zig" );
35
36
_ = @import ("behavior/bugs/655.zig" );
36
37
_ = @import ("behavior/bugs/656.zig" );
37
38
_ = @import ("behavior/bugs/679.zig" );
Original file line number Diff line number Diff line change
1
+ const std = @import ("std" );
2
+ const expect = std .testing .expect ;
3
+
4
+ const TestContext = struct {
5
+ server_context : * ListenerContext ,
6
+ };
7
+
8
+ const ListenerContext = struct {
9
+ context_alloc : * ContextAllocator ,
10
+ };
11
+
12
+ const ContextAllocator = MemoryPool (TestContext );
13
+
14
+ fn MemoryPool (comptime T : type ) type {
15
+ return struct {
16
+ n : usize ,
17
+ };
18
+ }
19
+
20
+ test "foo" {
21
+ var allocator = ContextAllocator { .n = 10 };
22
+ expect (allocator .n == 10 );
23
+ }
You can’t perform that action at this time.
0 commit comments