categorize behavior/bugs/<issueno>.zig tests
This commit is contained in:
committed by
Andrew Kelley
parent
282ff8d3bd
commit
804cee3b93
@@ -495,3 +495,17 @@ test "variable of optional of noreturn" {
|
||||
_ = &null_opv;
|
||||
try std.testing.expectEqual(@as(?noreturn, null), null_opv);
|
||||
}
|
||||
|
||||
test "copied optional doesn't alias source" {
|
||||
if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO
|
||||
if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO
|
||||
if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO
|
||||
if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest;
|
||||
|
||||
var opt_x: ?[3]f32 = [_]f32{0.0} ** 3;
|
||||
|
||||
const x = opt_x.?;
|
||||
opt_x.?[0] = 15.0;
|
||||
|
||||
try expect(x[0] == 0.0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user