mirror of
https://github.com/ziglang/zig.git
synced 2026-01-20 22:35:24 +00:00
behavior tests: remove one dependency on std lib
This commit is contained in:
parent
04bd30f021
commit
2d9df0bb1a
@ -103,7 +103,11 @@ test "basic extern unions" {
|
||||
var foo = FooExtern{ .int = 1 };
|
||||
try expect(foo.int == 1);
|
||||
foo.str.slice = "Well";
|
||||
try expect(std.mem.eql(u8, std.mem.sliceTo(foo.str.slice, 0), "Well"));
|
||||
try expect(foo.str.slice[0] == 'W');
|
||||
try expect(foo.str.slice[1] == 'e');
|
||||
try expect(foo.str.slice[2] == 'l');
|
||||
try expect(foo.str.slice[3] == 'l');
|
||||
try expect(foo.str.slice[4] == 0);
|
||||
}
|
||||
|
||||
const ExternPtrOrInt = extern union {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user