mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-06-26 18:44:28 -04:00
7140d08334
- use logical ops for boolean bitwise instructions - normalize strange-int results in airArithOp, airReduce, and airIntCast Co-authored-by: Quint Daenen <quint@daenen.email>
19 lines
511 B
Zig
19 lines
511 B
Zig
const builtin = @import("builtin");
|
|
const other = @import("pub_enum/other.zig");
|
|
const expect = @import("std").testing.expect;
|
|
|
|
test "pub enum" {
|
|
if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest;
|
|
|
|
try pubEnumTest(other.APubEnum.Two);
|
|
}
|
|
fn pubEnumTest(foo: other.APubEnum) !void {
|
|
try expect(foo == other.APubEnum.Two);
|
|
}
|
|
|
|
test "cast with imported symbol" {
|
|
if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest;
|
|
|
|
try expect(@as(other.size_t, 42) == 42);
|
|
}
|