mirror of
https://github.com/ziglang/zig.git
synced 2025-12-25 07:33:08 +00:00
My previous commit added a new behavior test that passes for stage2 but I forgot to check whether it passes for stage1. Since it does not, it has to be disabled. Additionally, this commit organizes behavior tests; there is no longer a section of tests only passing for stage1. Instead, tests are disabled on an individual basis. There is an except for the file which has global assembly in it.
22 lines
421 B
Zig
22 lines
421 B
Zig
const Foobar = struct {
|
|
myTypes: [128]type,
|
|
str: [1024]u8,
|
|
|
|
fn foo() @This() {
|
|
comptime var foobar: Foobar = undefined;
|
|
foobar.str = [_]u8{'a'} ** 1024;
|
|
return foobar;
|
|
}
|
|
};
|
|
|
|
fn foo(arg: anytype) void {
|
|
_ = arg;
|
|
}
|
|
|
|
test {
|
|
if (@import("builtin").zig_backend != .stage1) return error.SkipZigTest; // TODO
|
|
|
|
comptime var foobar = Foobar.foo();
|
|
foo(foobar.str[0..10]);
|
|
}
|