mirror of
https://github.com/ziglang/zig.git
synced 2026-02-12 20:37:54 +00:00
parent
c58b802034
commit
ee5e196f88
@ -29,3 +29,8 @@ test "truncate sign mismatch but comptime known so it works anyway" {
|
||||
var result = @truncate(i8, x);
|
||||
expect(result == 10);
|
||||
}
|
||||
|
||||
test "truncate on comptime integer" {
|
||||
var x = @truncate(u16, 9999);
|
||||
expect(x == 9999);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user