mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-03-08 02:24:33 +01:00
behavior tests: remove one dependency on std lib
This commit is contained in:
parent
04bd30f021
commit
2d9df0bb1a
1 changed files with 5 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue