mirror of
https://github.com/ziglang/zig.git
synced 2024-11-28 16:12:33 +00:00
ad5770eba4
* Identify the ones that are passing and stop skipping them. * Flatten out the main behavior.zig file and have each individual test disable itself if it is not passing.
18 lines
674 B
Zig
18 lines
674 B
Zig
const builtin = @import("builtin");
|
|
const std = @import("std");
|
|
const expect = std.testing.expect;
|
|
const maxInt = std.math.maxInt;
|
|
|
|
test "@intCast i32 to u7" {
|
|
if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO
|
|
if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO
|
|
if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO
|
|
if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO
|
|
if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO
|
|
|
|
var x: u128 = maxInt(u128);
|
|
var y: i32 = 120;
|
|
var z = x >> @intCast(u7, y);
|
|
try expect(z == 0xff);
|
|
}
|