mirror of
https://github.com/ziglang/zig.git
synced 2024-11-28 16:12:33 +00:00
be71195bba
There was panic that said TODO add __trunctfhf2 to compiler-rt, but I checked and that function has been in compiler-rt since April.
14 lines
259 B
Zig
14 lines
259 B
Zig
const std = @import("std");
|
|
const expect = std.testing.expect;
|
|
const mem = std.mem;
|
|
|
|
test "integer widening" {
|
|
var a: u8 = 250;
|
|
var b: u16 = a;
|
|
var c: u32 = b;
|
|
var d: u64 = c;
|
|
var e: u64 = d;
|
|
var f: u128 = e;
|
|
try expect(f == a);
|
|
}
|