zig/test/behavior/bugs/7027.zig
Andrew Kelley f27d3409bd behavior tests: disable failing stage1 test
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.
2022-03-23 14:06:07 -07:00

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]);
}